aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/block.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Switch blocks to a constant-space Merkle root/branch algorithm.Pieter Wuille2015-11-271-63/+0
| | | | | | | | | | | This switches the Merkle tree logic for blocks to one that runs in constant (small) space. The old code is moved to tests, and a new test is added that for various combinations of block sizes, transaction positions to compute a branch for, and mutations: * Verifies that the old code and new code agree for the Merkle root. * Verifies that the old code and new code agree for the Merkle branch. * Verifies that the computed Merkle branch is valid. * Verifies that mutations don't change the Merkle root. * Verifies that mutations are correctly detected.
* Do not store Merkle branches in the wallet.Pieter Wuille2015-09-221-37/+2
| | | | | | | | | | Assume that when a wallet transaction has a valid block hash and transaction position in it, the transaction is actually there. We're already trusting wallet data in a much more fundamental way anyway. To prevent backward compatibility issues, a new record is used for storing the block locator in the wallet. Old wallets will see a wallet file synchronized up to the genesis block, and rescan automatically.
* Replace CBlockHeader::GetHash with call to SerializeHashWladimir J. van der Laan2015-03-061-12/+1
| | | | | Removes variability between LE and BE. As suggested by @sipa.
* src/primitives/block.cpp: endian compatibility in GetHashWladimir J. van der Laan2015-03-061-0/+12
|
* Replace direct use of 0 with SetNull and IsNullWladimir J. van der Laan2015-01-051-2/+2
| | | | | | Replace x=0 with .SetNull(), x==0 with IsNull(), x!=0 with !IsNull(). Replace uses of uint256(0) with uint256().
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* MOVEONLY: core/ -> primitives/Luke Dashjr2014-12-031-0/+130