Open msbrogli opened 3 months ago
I see, RocksDBTokensIndex._create_genesis_info()
doesn't exist in MemoryTokensIndex
because it uses a defaultdict
, its purpose is to create the info for the HTR token when first needed. However if the genesis transactions are added to the index, and handled as a token creation (which is how it possibly should be handled), then it will be created and that method will not be needed.
I'll open a fix for this soon.
RocksDBTokensIndex._create_genesis_info()
takes care of creating token info for the HTR token. This similar method does not exist inMemoryTokensIndex
. Maybe we could have a common code inTokenIndexInfo
.Another issue is that both indexes are not indexing the genesis block. So they just work as expected after the first block is mined. Here is a simple test that fails in
master
(commit 4a46f3af85b6b016cefb875f5d3f4d0e45e8b7ea):Run a full node with no connections. Cmdline:
./hathor-cli run_node --status 8080 --nano-testnet --wallet-index --memory-storage
. It fails when using a RocksDB storage too.