remove unused code #4183

pull kdomanski wants to merge 6 commits into bitcoin:master from kdomanski:2014_05_dead_code changing 12 files +0 −94
  1. kdomanski commented at 8:24 PM on May 13, 2014: contributor

    The title is self-explanatory, Obviously, you might want to keep some of those, so I'm waiting for feedback.

  2. laanwj commented at 6:37 AM on May 14, 2014: member

    Did some digging using git's pickaxe...

    ACK on removing:

    • CWallet::AddReserveKey : Was never used at all, added by @sipa back in 2011 in 30ab2c9c
    • CTransaction::IsNewerThan: Was used by the transaction replacement code which was removed in 98c7c8fd
    • LogException: Hasn't been used for as long as Satoshi was still here
    • LookupHostNumeric: Is simply a wrapper for LookupHost(_1, _2, _3, false), no need for this we can pass a boolean if we need this functionality.
    • CBlockIndex::GetMedianTime: was used in CWalletTx::GetTxTime until 471426fb3, in 2011

    NACK on removing:

    • CWallet::GetDestData: part of the *DestData API, which is planned to be used more extensively by the GUI
    • CNetAddr::IsMulticast: part of basic 'what is this address' functionality - though it's doubtful we will use multicast, we might want to detect these addresses for error robustness or such.
    • CDBEnv::RemoveDb: doubtful that we'll ever allow removing wallets - but for API symmetry it makes sense to keep this function
    • CService::SetPort: API symmetry, run-time configurability
    • UnregisterWallet: it's probably a bug that this isn't used - and will certainly be needed if someone ever implements multi-wallet support

    Not sure:

    • CPubKey::VerifyCompact: counterpart to CKey::SignCompact which is used, but seems that we use RecoverCompact instead in verifymessage()
  3. remove CWallet::AddReserveKey which is never used 0e31e5631c
  4. remove CTransaction::IsNewerThan which is never used f4057cb749
  5. remove LogException( ) which is never used 595f691d0a
  6. remove LookupHostNumeric( ) which is never used 5bd4adca71
  7. remove GetMedianTime( ) which is never used 28b6c1def5
  8. remove CPubKey::VerifyCompact( ) which is never used f40dbeedde
  9. kdomanski commented at 12:59 PM on May 20, 2014: contributor

    Dropped the removal of functions under "NACK on removing" and "Not sure". Rebased against master.

  10. BitcoinPullTester commented at 1:39 PM on May 20, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f40dbeedde3a6a73c13b0241258cf23248db1de1 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.

  11. laanwj merged this on May 25, 2014
  12. laanwj closed this on May 25, 2014

  13. laanwj referenced this in commit 0f1040ba52 on May 25, 2014
  14. kdomanski deleted the branch on May 25, 2014
  15. DrahtBot 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-17 09:15 UTC

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