diff options
author | gary rong <garyrong0905@gmail.com> | 2018-05-09 20:24:25 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-05-09 20:24:25 +0800 |
commit | 7beccb29becf439df7bf4c033a94c019ad25bead (patch) | |
tree | 5d8581c15f3f110c765c6383e0c4c7724418d6f0 /eth/downloader | |
parent | 5dbd8b42a90779bd4269012c1336679fd4ca9824 (diff) | |
download | go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.gz go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.bz2 go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.lz go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.xz go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.zst go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.zip |
all: get rid of error when creating memory database (#16716)
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
Diffstat (limited to 'eth/downloader')
-rw-r--r-- | eth/downloader/downloader_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index e85e234c0..d1a9a8694 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -75,7 +75,7 @@ type downloadTester struct { // newTester creates a new downloader test mocker. func newTester() *downloadTester { - testdb, _ := ethdb.NewMemDatabase() + testdb := ethdb.NewMemDatabase() genesis := core.GenesisBlockForTesting(testdb, testAddress, big.NewInt(1000000000)) tester := &downloadTester{ @@ -93,7 +93,7 @@ func newTester() *downloadTester { peerChainTds: make(map[string]map[common.Hash]*big.Int), peerMissingStates: make(map[string]map[common.Hash]bool), } - tester.stateDb, _ = ethdb.NewMemDatabase() + tester.stateDb = ethdb.NewMemDatabase() tester.stateDb.Put(genesis.Root().Bytes(), []byte{0x00}) tester.downloader = New(FullSync, tester.stateDb, new(event.TypeMux), tester, nil, tester.dropPeer) |