OSDN Git Service

get BlockNode from database (#188)
[bytom/vapor.git] / test / utxo_view / utxo_view_test_util.go
index 3948f7e..1e021bc 100644 (file)
@@ -6,7 +6,6 @@ import (
        "github.com/vapor/consensus"
        "github.com/vapor/protocol/bc"
        "github.com/vapor/protocol/bc/types"
        "github.com/vapor/consensus"
        "github.com/vapor/protocol/bc"
        "github.com/vapor/protocol/bc/types"
-       "github.com/vapor/protocol/state"
        "github.com/vapor/testutil"
 )
 
        "github.com/vapor/testutil"
 )
 
@@ -49,22 +48,6 @@ func (t *tx) OutputHash(outIndex int) *bc.Hash {
        return t.Tx.ResultIds[outIndex]
 }
 
        return t.Tx.ResultIds[outIndex]
 }
 
-func blockNode(header *bc.BlockHeader) *state.BlockNode {
-       h := types.BlockHeader{
-               Version:           header.Version,
-               Height:            header.Height,
-               PreviousBlockHash: *header.PreviousBlockId,
-               Timestamp:         header.Timestamp,
-       }
-       return &state.BlockNode{
-               Parent:    nil,
-               Hash:      h.Hash(),
-               Version:   h.Version,
-               Height:    h.Height,
-               Timestamp: h.Timestamp,
-       }
-}
-
 func mustDecodeHex(str string) []byte {
        data, err := hex.DecodeString(str)
        if err != nil {
 func mustDecodeHex(str string) []byte {
        data, err := hex.DecodeString(str)
        if err != nil {