diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-18 17:37:30 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-18 17:47:50 +0800 |
commit | 15e169e5b6566b77aba23cc04c2f19a94ff23738 (patch) | |
tree | 978abe20851f73ff614a9746d22db20ddc469685 /core/block_processor_test.go | |
parent | f5abc9f188fb684e3601314b8ae454ac5abbf0e9 (diff) | |
download | dexon-15e169e5b6566b77aba23cc04c2f19a94ff23738.tar.gz dexon-15e169e5b6566b77aba23cc04c2f19a94ff23738.tar.zst dexon-15e169e5b6566b77aba23cc04c2f19a94ff23738.zip |
core: ValidatedHeader (method => function)
Changed header validation method to function in preparation of
@karalabe's PR.
Diffstat (limited to 'core/block_processor_test.go')
-rw-r--r-- | core/block_processor_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/block_processor_test.go b/core/block_processor_test.go index 97b80038d..e38c815ef 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -26,18 +26,20 @@ func proc() (*BlockProcessor, *ChainManager) { } func TestNumber(t *testing.T) { - bp, chain := proc() + _, chain := proc() block1 := chain.NewBlock(common.Address{}) block1.Header().Number = big.NewInt(3) block1.Header().Time-- - err := bp.ValidateHeader(block1.Header(), chain.Genesis().Header(), false) + pow := ezp.New() + + err := ValidateHeader(pow, block1.Header(), chain.Genesis().Header(), false) if err != BlockNumberErr { t.Errorf("expected block number error %v", err) } block1 = chain.NewBlock(common.Address{}) - err = bp.ValidateHeader(block1.Header(), chain.Genesis().Header(), false) + err = ValidateHeader(pow, block1.Header(), chain.Genesis().Header(), false) if err == BlockNumberErr { t.Errorf("didn't expect block number error") } |