No need to use a stringstream here. The trivial change can be verified by running the functional test rpc_net.py:
https://github.com/bitcoin/bitcoin/blob/c73c8d53fe27956faacb3e8ca0e94adf071de6ec/test/functional/rpc_net.py#L181-L184
As far as I could tell, this is the only instace left where we used std::ostringstream for the creation of simple strings (in FormatSubVersion using a stream makes sense since the number of placeholders is not constant).
refactor: use `strprintf` for creating unknown-service-flag string #25888
pull theStack wants to merge 1 commits into bitcoin:master from theStack:202208-refactor-use_strprintf_in_serviceFlagToStr changing 1 files +1 −6-
theStack commented at 1:22 PM on August 20, 2022: contributor
-
706c8e0969
refactor: use `strprintf` for creating unknown-service-flag string
No need to use a stringstream here.
- fanquake added the label Refactoring on Aug 20, 2022
- kristapsk approved
-
kristapsk commented at 3:30 PM on August 20, 2022: contributor
ACK 706c8e096978b694fb56dee9e8ed8f55373ad5a0
- luke-jr approved
-
luke-jr commented at 8:46 PM on August 20, 2022: member
utACK
- MarcoFalke merged this on Aug 22, 2022
- MarcoFalke closed this on Aug 22, 2022
- sidhujag referenced this in commit d75bee6acf on Aug 22, 2022
- bitcoin locked this on Aug 22, 2023
Labels