neoneo-go/pkg/chain
decentralisedkev 493d8f3d95
[chain] Refactor, add chaincfg and database initialisation (#243)
* [chain]

- Add basic chain cfg parameters

- Added logic to insert genesis block, if it is a fresh database

- changed SaveBlock to ProcessBlock
- changed SaveHeaders to ProcessHeaders

- Changed parameter from a wire message to the payload, for header and
block processing

- Added check in chain for when the block is in the future, i.e. not at
the tip of the chain

- Added custom error returns, to distinguish between a database error
and a validation error
2019-03-28 20:23:50 +00:00
..
chain.go [chain] Refactor, add chaincfg and database initialisation (#243) 2019-03-28 20:23:50 +00:00
chaindb.go Finalized size calculation methodology (#215) 2019-03-25 01:04:54 +00:00
chaindb_test.go Add Chain saving functionality to Database (#206) 2019-03-23 16:57:05 +00:00
errors.go [chain] Refactor, add chaincfg and database initialisation (#243) 2019-03-28 20:23:50 +00:00