neoneo-go/pkg/core
Roman Khimov 8926cbe368 core: fix potential data race in logging code
Spotted in CircleCI build with Go 1.12:

WARNING: DATA RACE
Write at 0x00c00011095c by goroutine 88:
  sync/atomic.SwapInt32()
      /usr/local/go/src/runtime/race_amd64.s:249 +0xb
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).persist()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:483 +0x172
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run.func2()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:191 +0x50

Previous read at 0x00c00011095c by goroutine 64:
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).persist()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:492 +0x4be
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run.func2()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:191 +0x50

Goroutine 88 (running) created at:
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:190 +0x264

Goroutine 64 (finished) created at:
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:190 +0x264
2019-10-15 18:58:22 +03:00
..
storage storage: simplify MemoryBatch 2019-10-15 12:56:25 +03:00
test_data Persist blockchain with leveldb on disk (#48) 2018-03-17 12:53:21 +01:00
transaction transaction: add a check for createHash() invocation 2019-09-24 13:01:54 +03:00
account_state.go core: remove blockCache, use MemoryStore, redesign persist() 2019-09-27 15:42:35 +03:00
account_state_test.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
asset_state.go core: add putAssetStateIntoStore() 2019-10-15 12:56:25 +03:00
asset_state_test.go core: add putAssetStateIntoStore() 2019-10-15 12:56:25 +03:00
block.go core: verify blocks, fix #12 2019-10-15 18:58:17 +03:00
block_base.go core: verify blocks, fix #12 2019-10-15 18:58:17 +03:00
block_test.go core: verify blocks, fix #12 2019-10-15 18:58:17 +03:00
blockchain.go core: fix potential data race in logging code 2019-10-15 18:58:22 +03:00
blockchain_test.go core: verify blocks, fix #12 2019-10-15 18:58:17 +03:00
blockchainer.go core: add some interops 2019-10-15 12:56:25 +03:00
coin_state.go Persist transactions (#51) 2018-03-21 17:11:04 +01:00
contract_state.go core: make ContractState receiver names consistent 2019-10-15 12:56:25 +03:00
contract_state_test.go core: add put/delete functions for ContractState 2019-10-15 12:56:25 +03:00
feer.go Implement rpc server method: sendrawtransaction (#174) 2019-03-20 12:30:05 +00:00
header.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
header_hash_list.go io: move BinReader/BinWriter there, redo Serializable with it 2019-09-16 23:39:51 +03:00
header_test.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
helper_test.go core: verify blocks, fix #12 2019-10-15 18:58:17 +03:00
interop_neo.go core: add some interops 2019-10-15 12:56:25 +03:00
interop_system.go core: add some interops 2019-10-15 12:56:25 +03:00
interops.go core: add some interops 2019-10-15 12:56:25 +03:00
mem_pool.go Implement rpc server method: sendrawtransaction (#174) 2019-03-20 12:30:05 +00:00
random_util_test.go pkg: make use of the new crypto/hash package 2019-08-26 13:32:19 +03:00
spent_coin_state.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
spent_coin_state_test.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
storage_item.go core: implement StorageItem for future interops 2019-10-15 12:56:25 +03:00
storage_item_test.go core: implement StorageItem for future interops 2019-10-15 12:56:25 +03:00
unspent_coin_state.go core: remove blockCache, use MemoryStore, redesign persist() 2019-09-27 15:42:35 +03:00
unspent_coint_state_test.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
util.go io: redo Serializable to return errors in BinReader/BinWriter 2019-09-17 13:21:52 +03:00
util_test.go uint256: add Reverse(), change String() to be BE 2019-08-26 13:32:19 +03:00
validator_state.go crypto/wallet: move public/private key into the new keys package 2019-08-27 17:45:51 +03:00