ensure the ncc trie and any caches are always in sync with the current best block
by informing the trie when the block changes, and have the ncc trie persist that
in the database. check against that whenever modifying the trie.
get rid of the possibility of a CNCCTrieCache having a null base, and create a
CNCCTrie in test_bitcoin.cpp so one exists during testing.
ncctrietests.cpp:
add test to make sure emptying the ncc trie cache results in a
default hash ("00...01")
ncctrie.cpp:
fix the ncc trie cache so that emptying it causes the root hash
to be computed as the default hash ("00...01")
fix two bugs in reading the ncc trie from disk:
all insertions were returning immediately due to parenthesis
misplacement, and the loop reading nodes from disk wasn't
terminating due to a lack of an incrementing operation
miner.cpp
fix a bug in the miner where input coins in the cache were being
spent before their txouts could be checked for NCC commands
main.cpp
add some assertions when disconnecting blocks from the active
chain, ensuring the merkle root of the ncc trie after undoing the
block is equal to the hashNCCTrie in the previous block
fix an erroneous assertion in ConnectBlock to assert the correct
expected value
change some log statements to use __func__
init.cpp
change the order of some init operations so the NCC trie is
restored from disk before the DB is verified
create an rpc command to print the whole ncc trie
create an rpc command to search get transaction info
for a particular name
change the number of bytes in the header expected by miner.cpp
make sure the ncc merkle hash is copied to all structures that
need it