Clean-up SyncWithWallets/SyncTransaction #4716

pull cozz wants to merge 1 commits into bitcoin:master from cozz:cozz7 changing 2 files +2 −8
  1. cozz commented at 4:50 PM on August 17, 2014: contributor
    • replace g_signals.SyncTransaction with SyncWithWallets for consistence
    • remove SyncTransaction from ConnectBlock. ConnectBlock is called from ConnectTip, we already sync there, no need to sync the txs twice.
    • remove SyncWithWallets from sendrawtransaction. We call SyncWithWallets in AcceptToMemoryPool.

    I tested sendrawtransaction, tx showed up in the GUI. Tested sending a tx, then start new wallet and wait for tx from block, tx showed up in the GUI.

  2. Clean-up SyncWithWallets/SyncTransaction 0d27dad845
  3. laanwj added the label Wallet on Aug 18, 2014
  4. BitcoinPullTester commented at 3:49 PM on August 18, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4716_0d27dad8452704fa849832a0d28bf3e1b564d7b7/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  5. sipa commented at 6:53 PM on August 18, 2014: member

    Untested ACK on each of the changes.

  6. laanwj commented at 9:11 AM on August 19, 2014: member

    ConnectBlock is called from more places than just ConnectTip. The only possibly problematic case I see is the call from CreateNewBlock by the internal miner. Missing the wallet update there may cause some transactions to not be properly updated in the GUI.

  7. cozz commented at 9:44 PM on August 19, 2014: contributor

    @laanwj Can you describe such a scenario? A miner only mines txs from the mempool, this means the txs are in the wallet as unconfirmed already, as we sync them to the wallet in AcceptToMemoryPool. Now if they get confirmed, they will be synced again through ConnectTip, independent of 'who has found the block'. The coinbase tx also gets synced through ConnectTip, if the block makes it temporarily or permanent in the main chain. If the block gets orphaned immediately, I dont think anybody cares about that coinbase tx.

  8. sipa commented at 10:35 PM on August 19, 2014: member

    @laanwj The case of CreateNewBlock calling ConnectBlock directly is an argument in favor of why ConnectBlock shouldn't do wallet callbacks - it's a more low-level function that just applies the UTXO state changes of a block. As @cozz says, ConnectTip is called indirectly when a new block gets accepted.

  9. laanwj commented at 11:01 AM on August 25, 2014: member

    OK. Untested ACK.

  10. laanwj merged this on Aug 25, 2014
  11. laanwj closed this on Aug 25, 2014

  12. laanwj referenced this in commit 49f954f154 on Aug 25, 2014
  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me