neoneo-go/pkg/core/state
Roman Khimov 23464401bc core/state: merge spent and unspent coins state, use it to store more things
This change reduces pressure on DB by doing the following things:
 * not storing additional KV pair for SpentCoin
 * storing Output right in the UnspentCoin, thus eliminating the need to get a
   full transaction from DB

At the same time it makes UnspentCoin more fat and hot, but it should probably
worth it.

Also drop `GetUnspentCoinStateOrNew` as it shouldn't ever existed, UTXOs
can't come out of nowhere.

1.5M block import time (VerifyBlocks disabled) on AMD Ryzen 5 1600/16GB/HDD,
before:
real    302m9.895s
user    96m17.200s
sys     13m37.084s

after:
real    159m16.551s
user    69m58.279s
sys     7m34.334s

So it's almost two-fold which is a great improvement.
2020-03-11 12:40:02 +03:00
..
account.go core: track NEP5 balances 2020-03-05 18:22:19 +03:00
account_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
asset.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
asset_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
coin.go core: renames entities-> state and removed State prefix 2019-12-11 13:14:18 +03:00
contract.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
contract_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
nep5.go rpc: implement getnep5transfers RPC 2020-03-05 18:22:40 +03:00
nep5_test.go rpc: implement getnep5transfers RPC 2020-03-05 18:22:40 +03:00
notification_event.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
notification_event_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
storage_item.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
storage_item_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
unspent_coin.go core/state: merge spent and unspent coins state, use it to store more things 2020-03-11 12:40:02 +03:00
unspent_coin_test.go core/state: merge spent and unspent coins state, use it to store more things 2020-03-11 12:40:02 +03:00
validator.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
validator_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00