OSDN Git Service

Opt db (#1926)
authorhauson <32921352+hauson@users.noreply.github.com>
Thu, 29 Apr 2021 03:33:25 +0000 (11:33 +0800)
committerGitHub <noreply@github.com>
Thu, 29 Apr 2021 03:33:25 +0000 (11:33 +0800)
commit92566a3fb999e917cafb75cb93894d7cea81115b
treef91e1e86f98d689fc166f2c8795928e041ec374d
parentd41318b483b0240d30c0fdf743fd5ce0b7935dfe
Opt db (#1926)

* feat(add save_block_header fn): add SaveBlockHeader fn

* feat(opt save_block): opt SaveBlock fn

* feat(modify cache_test): modify cache test

* feat(rename block cache): rename blockCache as cache

* feat(add get block): add get block

* feat(modify): modify

* feat(modify block_header): modify writer_to and read_from

* feat(modify bloch_header): modify block_header

* feat(fix block_header_test): add BlockWitness

* feat(fix block_test): fix block_test

* feat(fix block integration test): fix block integration test

* feat(fix block_header_test.go): fix

* feat(fix block_test.go): fix block_test.go

* feat(opt code format): opt code format of store.go

* feat(modify cache): modify cache

* feat(modify cache): modify cache

* feat(modify store.go): modify store.go

* feat(modify): modify

* feat(modify block_integration_uitl.go): modify block_integration_util.go

* feat(delete max_cached_blocks): delete maCachedBlocks

* feat(delete mu): delete mu

* feat(delete blockprefix and txstatusprefix): delete const BlockPrefix and TxsStatusPrefix

* feat(add notes): add consts notes
13 files changed:
database/cache.go
database/cache_test.go
database/store.go
database/store_geter.go [new file with mode: 0644]
database/store_test.go
netsync/chainmgr/storage.go
protocol/bc/types/block.go
protocol/bc/types/block_header.go
protocol/bc/types/block_header_test.go
protocol/bc/types/block_test.go
protocol/bc/types/transaction.go
test/integration/block_integration_test.go
test/integration/block_integration_util.go