aboutsummaryrefslogtreecommitdiffstats
path: root/light/lightchain_test.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2018-05-09 20:24:25 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-09 20:24:25 +0800
commit7beccb29becf439df7bf4c033a94c019ad25bead (patch)
tree5d8581c15f3f110c765c6383e0c4c7724418d6f0 /light/lightchain_test.go
parent5dbd8b42a90779bd4269012c1336679fd4ca9824 (diff)
downloadgo-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 'light/lightchain_test.go')
-rw-r--r--light/lightchain_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/light/lightchain_test.go b/light/lightchain_test.go
index b8ab1c51c..c0aa51da2 100644
--- a/light/lightchain_test.go
+++ b/light/lightchain_test.go
@@ -52,7 +52,7 @@ func makeHeaderChain(parent *types.Header, n int, db ethdb.Database, seed int) [
// chain. Depending on the full flag, if creates either a full block chain or a
// header only chain.
func newCanonical(n int) (ethdb.Database, *LightChain, error) {
- db, _ := ethdb.NewMemDatabase()
+ db := ethdb.NewMemDatabase()
gspec := core.Genesis{Config: params.TestChainConfig}
genesis := gspec.MustCommit(db)
blockchain, _ := NewLightChain(&dummyOdr{db: db}, gspec.Config, ethash.NewFaker())
@@ -69,7 +69,7 @@ func newCanonical(n int) (ethdb.Database, *LightChain, error) {
// newTestLightChain creates a LightChain that doesn't validate anything.
func newTestLightChain() *LightChain {
- db, _ := ethdb.NewMemDatabase()
+ db := ethdb.NewMemDatabase()
gspec := &core.Genesis{
Difficulty: big.NewInt(1),
Config: params.TestChainConfig,