Skip to content

Commit

Permalink
[trivial] Remove misleading 'const'
Browse files Browse the repository at this point in the history
Summary:
Returning by const value is only meaningful in a specific circumstance around
user defined types. In this case, the const is not enforcing any restrictions
on the call site, so is misleading.

This is a backport of Core [[bitcoin/bitcoin#18807 | PR18807]] [7/9]
bitcoin/bitcoin@750456d

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9034
  • Loading branch information
amitiuttarwar authored and PiRK committed Jan 22, 2021
1 parent a26312c commit dbfdb44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/txmempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ class CTxMemPool {
void RemoveUnbroadcastTx(const TxId &txid, const bool unchecked = false);

/** Returns transactions in unbroadcast set */
const std::set<TxId> GetUnbroadcastTxs() const {
std::set<TxId> GetUnbroadcastTxs() const {
LOCK(cs);
return m_unbroadcast_txids;
}
Expand Down

0 comments on commit dbfdb44

Please sign in to comment.