Skip to content

Commit

Permalink
Add some notes
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Sep 24, 2019
1 parent b6b5c80 commit 6346613
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/src/db/DB.java
Expand Up @@ -32,10 +32,6 @@ public class DB implements DBFace
protected DBMapMutationSet special_map_set;


// for the Hashed Trie of additional information
// including:
// * transactions for addresses
// * transaction to block
protected DBMap chain_index_map;
protected HashedTrie chain_index_trie;

Expand Down Expand Up @@ -83,14 +79,11 @@ public void open()

if (config.getBoolean("addr_index"))
{
// This could be switched to UTXO style, complete with having a merkle root
// for the top. This wouldn't be in the headers, but could be advertised to clients
// who can query for a concensus of address history roots. And then address history
// becomes much more firm and less potentially full of lies.
//address_history_map = prov.openMutationMapSet("addr_hist_2");
// This has been swithed to Hashed Trie in chain_index_trie
}
if (config.getBoolean("tx_index"))
{
// This has been swithed to Hashed Trie in chain_index_trie
}
}

Expand All @@ -109,9 +102,19 @@ public void open()
@Override
public DBMap getUtxoNodeMap() { return utxo_node_map; }


/**
* This is a hashed trie that holds data other than the UTXO.
* - address to tx (a2tx)
* - transaction to block (tx2b)
*/
@Override
public HashedTrie getChainIndexTrie() { return chain_index_trie; }


/**
* Used by things like the mining pool, not actually used in the node
*/
@Override
public DBMapMutationSet getSpecialMapSet() { return special_map_set; }

Expand Down

0 comments on commit 6346613

Please sign in to comment.