Skip to content

Commit 9acc25b

Browse files
committed
Merge bitcoin/bitcoin#32153: wallet: remove redundant Assert call when block is disconnected
ae6b6ea wallet: remove redundant `Assert` call when block is disconnected (rkrux) Pull request description: It was highlighted in a PR discussion previously that the recently moved `Assert` macro call inside the block disconnected loop had been redundant for quite a while because of the presence of the `assert` macro call at the start of the function. Therefore, it is removed now. refs #bitcoin/bitcoin#31757 (comment) ACKs for top commit: fjahr: utACK ae6b6ea l0rinc: crACK ae6b6ea hodlinator: Code Review ACK ae6b6ea Prabhat1308: Code Review ACK [`ae6b6ea`](bitcoin/bitcoin@ae6b6ea) Tree-SHA512: 6bbced88f4b39afcacefb7babe97c180a397d9cd55f18c4c2875bd594547dcdccb2059ac32495e0e8d4e7263b4c1349ca80b2f0fbd46b4450d1d847ba5abd903
2 parents 0a1e36e + ae6b6ea commit 9acc25b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ void CWallet::blockDisconnected(const interfaces::BlockInfo& block)
15491549
int disconnect_height = block.height;
15501550

15511551
for (size_t index = 0; index < block.data->vtx.size(); index++) {
1552-
const CTransactionRef& ptx = Assert(block.data)->vtx[index];
1552+
const CTransactionRef& ptx = block.data->vtx[index];
15531553
// Coinbase transactions are not only inactive but also abandoned,
15541554
// meaning they should never be relayed standalone via the p2p protocol.
15551555
SyncTransaction(ptx, TxStateInactive{/*abandoned=*/index == 0});

0 commit comments

Comments
 (0)