aboutsummaryrefslogtreecommitdiffstats
path: root/light/lightchain_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-05-07 19:35:06 +0800
committerGitHub <noreply@github.com>2018-05-07 19:35:06 +0800
commit6cf0ab38bd0af77d81aad4c104979cebee9e3e63 (patch)
tree142d6f965c44dcf9e2182da67b7bbc978c573448 /light/lightchain_test.go
parent5463ed99968bf71685a2a8ee9dbf8705912f00cb (diff)
downloaddexon-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.gz
dexon-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.zst
dexon-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.zip
core/rawdb: separate raw database access to own package (#16666)
Diffstat (limited to 'light/lightchain_test.go')
-rw-r--r--light/lightchain_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/light/lightchain_test.go b/light/lightchain_test.go
index 0af7551d4..b8ab1c51c 100644
--- a/light/lightchain_test.go
+++ b/light/lightchain_test.go
@@ -24,6 +24,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
+ "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/params"
@@ -122,8 +123,8 @@ func testHeaderChainImport(chain []*types.Header, lightchain *LightChain) error
}
// Manually insert the header into the database, but don't reorganize (allows subsequent testing)
lightchain.mu.Lock()
- core.WriteTd(lightchain.chainDb, header.Hash(), header.Number.Uint64(), new(big.Int).Add(header.Difficulty, lightchain.GetTdByHash(header.ParentHash)))
- core.WriteHeader(lightchain.chainDb, header)
+ rawdb.WriteTd(lightchain.chainDb, header.Hash(), header.Number.Uint64(), new(big.Int).Add(header.Difficulty, lightchain.GetTdByHash(header.ParentHash)))
+ rawdb.WriteHeader(lightchain.chainDb, header)
lightchain.mu.Unlock()
}
return nil