1. 30 Apr, 2014 1 commit
  2. 24 Apr, 2014 1 commit
  3. 23 Apr, 2014 1 commit
  4. 18 Apr, 2014 1 commit
    • Wladimir J. van der Laan's avatar
      Solve chainActive-related locking issues · 66dbf49f
      Wladimir J. van der Laan authored
      - In wallet and GUI code LOCK cs_main as well as cs_wallet when
        necessary
      - In main.cpp SendMessages move the TRY_LOCK(cs_main) up, to encompass the call
        to IsInitialBlockDownload.
      - Make ActivateBestChain, AddToBlockIndex, IsInitialBlockDownload,
        InitBlockIndex acquire the cs_main lock
      
      Fixes #3997
      66dbf49f
  5. 17 Apr, 2014 1 commit
  6. 06 Apr, 2014 1 commit
  7. 29 Mar, 2014 1 commit
    • Wladimir J. van der Laan's avatar
      Fix `-printblocktree` output · d6870d29
      Wladimir J. van der Laan authored
      PrintBlockTree output was broken starting from e010af70.
      Everything appears on one line.
      
      PrintWallet() added the newline after a block, but this functionality
      was removed and no newline was added.
      
      Seemingly, no one noticed. Add a newline after the block information
      to fix this.
      d6870d29
  8. 11 Mar, 2014 2 commits
  9. 10 Mar, 2014 1 commit
    • Mike Hearn's avatar
      Make mining fee policy match relay fee policy. · 08751f73
      Mike Hearn authored
      This resolves a case in which a mismatch could be used to bloat up the
      mempool by sending transactions that pay enough fee to relay, but not
      to be mined, with the default policies.
      08751f73
  10. 26 Feb, 2014 1 commit
    • Gavin Andresen's avatar
      Remove CWalletTx::vfSpent · 335d0c34
      Gavin Andresen authored
      Use the spent outpoint multimap to figure out which wallet transaction
      outputs are unspent, instead of a vfSpent array that is saved
      to disk.
      335d0c34
  11. 24 Feb, 2014 1 commit
    • Wladimir J. van der Laan's avatar
      Get rid of C99 PRI?64 usage in source files · 87fa85e8
      Wladimir J. van der Laan authored
      Amend to d5f1e727. It turns out that BerkelyDB was including inttypes.h
      indirectly, so we cannot fix this with just macros.
      
      Trivial commit: apply the following script to all .cpp and .h files:
      
          # Middle
          sed -i 's/"PRIx64"/x/g' "$1"
          sed -i 's/"PRIu64"/u/g' "$1"
          sed -i 's/"PRId64"/d/g' "$1"
          # Initial
          sed -i 's/PRIx64"/"x/g' "$1"
          sed -i 's/PRIu64"/"u/g' "$1"
          sed -i 's/PRId64"/"d/g' "$1"
          # Trailing
          sed -i 's/"PRIx64/x"/g' "$1"
          sed -i 's/"PRIu64/u"/g' "$1"
          sed -i 's/"PRId64/d"/g' "$1"
      
      After this commit, `git grep` for PRI.64 should turn up nothing except
      the defines in util.h.
      87fa85e8
  12. 22 Feb, 2014 1 commit
    • Wladimir J. van der Laan's avatar
      Don't use PRIx64 formatting derives from inttypes.h · 3618c435
      Wladimir J. van der Laan authored
      As the tinyformat-based formatting system (introduced in b77dfdc9) is
      type-safe, no special format characters are needed to specify sizes.
      
      Tinyformat can support (ignore) the C99 prefixes such as "ll" but
      chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't
      include inttypes.h and define our own for compatibility.
      
      (an alternative would be to sweep the entire codebase using sed -i to
      get rid of the size specifiers but this has less diff impact)
      3618c435
  13. 20 Feb, 2014 1 commit
  14. 14 Feb, 2014 1 commit
    • Gavin Andresen's avatar
      Handle "conflicted" transactions properly · 64e9a19b
      Gavin Andresen authored
      Extend CMerkleTx::GetDepthInMainChain with the concept of
      a "conflicted" transaction-- a transaction generated by the wallet
      that is not in the main chain or in the mempool, and, therefore,
      will likely never be confirmed.
      
      GetDepthInMainChain() now returns -1 for conflicted transactions
      (0 for unconfirmed-but-in-the-mempool, and >1 for confirmed).
      
      This makes getbalance, getbalance '*', and listunspent all agree when there are
      mutated transactions in the wallet.
      
      Before:
       listunspent: one 49BTC output
       getbalance: 96 BTC (change counted twice)
       getbalance '*': 46 BTC (spends counted twice)
      
      After: all agree, 49 BTC available to spend.
      64e9a19b
  15. 13 Feb, 2014 1 commit
  16. 11 Feb, 2014 1 commit
  17. 10 Feb, 2014 1 commit
  18. 08 Feb, 2014 1 commit
    • Pieter Wuille's avatar
      Per-peer block download tracking and stalled download detection. · 1d53de18
      Pieter Wuille authored
      Keep track of which block is being requested (and to be requested) from
      each peer, and limit the number of blocks in-flight per peer. In addition,
      detect stalled downloads, and disconnect if they persist for too long.
      
      This means blocks are never requested twice, and should eliminate duplicate
      downloads during synchronization.
      1d53de18
  19. 31 Jan, 2014 1 commit
    • Pieter Wuille's avatar
      Limit the number of orphan blocks · ee6b2861
      Pieter Wuille authored
      In case the total number of orphan blocks in memory exceeds a limit
      (currently set to 750), a random orphan block (which is not
      depended on by another orphan block) is dropped. This means it will
      need to be downloaded again, but it won't consume memory until then.
      ee6b2861
  20. 29 Jan, 2014 2 commits
  21. 28 Jan, 2014 1 commit
  22. 27 Jan, 2014 3 commits
    • Pieter Wuille's avatar
      Prepare block connection logic for headers-first. · e06a22b5
      Pieter Wuille authored
      This changes the block processing logic from "try to atomically switch
      to a new block" to a continuous "(dis)connect a block, aiming for the
      assumed best chain".
      
      This means the smallest atomic operations on the chainstate become
      individual block connections or disconnections, instead of entire
      reorganizations. It may mean that we try to reorganize to one block,
      fail, and rereorganize again to the old block. This is slower, but
      doesn't require unbounded RAM.
      
      It also means that a ConnectBlock which fails may be no longer called
      from the ProcessBlock which knows which node sent it. To deal with that,
      a mapBlockSource is kept, and invalid blocks cause asynchronous "reject"
      messages and banning (if necessary).
      e06a22b5
    • Pieter Wuille's avatar
    • Peter Todd's avatar
      Fix off-by-one errors in use of IsFinalTx() · c32ee02f
      Peter Todd authored
      Previously CreateNewBlock() didn't take into account the fact that
      IsFinalTx() without any arguments tests if the transaction is considered
      final in the *current* block, when both those functions really needed to
      know if the transaction would be final in the *next* block.
      
      Additionally the UI had a similar misunderstanding.
      
      Also adds some basic tests to check that CreateNewBlock() is in fact
      mining nLockTime-using transactions correctly.
      
      Thanks to Wladimir J. van der Laan for rebase.
      c32ee02f
  23. 23 Jan, 2014 2 commits
  24. 20 Jan, 2014 1 commit
  25. 11 Jan, 2014 1 commit
  26. 06 Jan, 2014 1 commit
  27. 19 Dec, 2013 1 commit
  28. 13 Dec, 2013 1 commit
  29. 08 Dec, 2013 1 commit
  30. 02 Dec, 2013 1 commit
    • Gregory Maxwell's avatar
      Sanitize assert usage and refuse to compile with NDEBUG. · b36e336a
      Gregory Maxwell authored
      There were quite a few places where assert() was used with side effects,
       making operation with NDEBUG non-functional.  This commit fixes all the
       cases I know about, but also adds an  #error on NDEBUG because the code
       is untested without assertions and may still have vulnerabilities if
       used without assert.
      b36e336a
  31. 30 Nov, 2013 3 commits
  32. 29 Nov, 2013 1 commit
  33. 26 Nov, 2013 1 commit