OSDN Git Service

fix log (#388)
[bytom/vapor.git] / test / utxo_view / utxo_view_test_util.go
index f73e344..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/protocol/state"
        "github.com/vapor/testutil"
 )
 
@@ -27,12 +26,12 @@ func newTx(t *types.Tx) *tx {
 }
 
 func (t *tx) getSourceID(outIndex int) *bc.Hash {
-       output := t.Tx.Entries[*t.Tx.OutputID(outIndex)].(*bc.Output)
+       output := t.Tx.Entries[*t.Tx.OutputID(outIndex)].(*bc.IntraChainOutput)
        return output.Source.Ref
 }
 
 func (t *tx) getAmount(outIndex int) uint64 {
-       output := t.Tx.Entries[*t.Tx.OutputID(outIndex)].(*bc.Output)
+       output := t.Tx.Entries[*t.Tx.OutputID(outIndex)].(*bc.IntraChainOutput)
        return output.Source.Value.Amount
 }
 
@@ -49,22 +48,6 @@ func (t *tx) OutputHash(outIndex int) *bc.Hash {
        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 {
@@ -79,7 +62,7 @@ func coinBaseTx(amount uint64, arbitrary string) *types.Tx {
                        types.NewCoinbaseInput([]byte(arbitrary)),
                },
                Outputs: []*types.TxOutput{
-                       types.NewTxOutput(*consensus.BTMAssetID, amount, mustDecodeHex("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
+                       types.NewIntraChainOutput(*consensus.BTMAssetID, amount, mustDecodeHex("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                },
        })
 }
@@ -114,8 +97,8 @@ func init() {
                                types.NewSpendInput(nil, toHash("ca9b179e549406aa583869e124e39817414d4500a8ce5476e95b6018d182b966"), *consensus.BTMAssetID, 41250000000, 0, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("00148c704747e94387fa0b8712b053ed2132d84820ac")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 41150000000, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("00148c704747e94387fa0b8712b053ed2132d84820ac")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 41150000000, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                        },
                }),
        }
@@ -128,8 +111,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[0].getSourceID(1), *consensus.BTMAssetID, 41150000000, 1, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("00148c704747e94387fa0b8712b053ed2132d84820ac")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 41050000000, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("00148c704747e94387fa0b8712b053ed2132d84820ac")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 41050000000, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                        },
                }),
        }
@@ -142,8 +125,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[1].getSourceID(1), *consensus.BTMAssetID, 41050000000, 1, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("00148c704747e94387fa0b8712b053ed2132d84820ac")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 40950000000, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("00148c704747e94387fa0b8712b053ed2132d84820ac")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40950000000, []byte("00144431c4278632c6e35dd2870faa1a4b8e0a275cbc")),
                        },
                }),
        }
@@ -158,10 +141,10 @@ func init() {
                                types.NewSpendInput(nil, toHash("50d1c966b3a58f9092a696136a75ceb801ea7da2470784d80ebf3f17a76b8a98"), assetID, 800000000000, 0, []byte("00140b0c5059514c751a80c4e1c94f8ecfe16d80671b")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 41150000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("00140b0c5059514c751a80c4e1c94f8ecfe16d80671b")),
-                               types.NewTxOutput(assetID, 700000000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
-                               types.NewTxOutput(assetID, 100000000000, []byte("00140b0c5059514c751a80c4e1c94f8ecfe16d80671b")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 41150000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("00140b0c5059514c751a80c4e1c94f8ecfe16d80671b")),
+                               types.NewIntraChainOutput(assetID, 700000000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
+                               types.NewIntraChainOutput(assetID, 100000000000, []byte("00140b0c5059514c751a80c4e1c94f8ecfe16d80671b")),
                        },
                }),
        }
@@ -175,10 +158,10 @@ func init() {
                                types.NewSpendInput(nil, toHash("d9a9b64e4f842060a40b15325d9aae61987776f7748e7e6a2887a474e84294ef"), assetID, 600000000000, 0, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 41150000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
-                               types.NewTxOutput(assetID, 600000000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
-                               types.NewTxOutput(assetID, 400000000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 41150000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(assetID, 600000000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(assetID, 400000000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
                        },
                }),
        }
@@ -192,10 +175,10 @@ func init() {
                                types.NewSpendInput(nil, toHash("466e6a9261d7b51f227d6c05b7cd3cc36487cc6f0cfb79c58794021e68d4c877"), assetID, 300000000000, 0, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 41050000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
-                               types.NewTxOutput(assetID, 200000000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
-                               types.NewTxOutput(assetID, 100000000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 41050000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
+                               types.NewIntraChainOutput(assetID, 200000000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(assetID, 100000000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
                        },
                }),
        }
@@ -209,10 +192,10 @@ func init() {
                                types.NewSpendInput(nil, toHash("e5757774fb46287ebda3479e19c8643d2fcdb5de3b1ac84d4020c1971bb3f531"), assetID, 100000000000, 0, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40950000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
-                               types.NewTxOutput(assetID, 50000000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
-                               types.NewTxOutput(assetID, 50000000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40950000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(assetID, 50000000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(assetID, 50000000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
                        },
                }),
        }
@@ -225,8 +208,8 @@ func init() {
                                types.NewSpendInput(nil, toHash("ca9b179e549406aa583869e124e39817514d4500a8ce5476e95b6018d182b966"), *consensus.BTMAssetID, 40950000000, 3, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40850000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40850000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
                        },
                }),
        }
@@ -239,8 +222,8 @@ func init() {
                                types.NewSpendInput(nil, toHash("ca9b179e549406aa583869e124e39817514d4500a8ce5476e95b6018d182b966"), *consensus.BTMAssetID, 40850000000, 4, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40750000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40750000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
                        },
                }),
        }
@@ -253,8 +236,8 @@ func init() {
                                types.NewSpendInput(nil, toHash("ca9b179e549406aa583869e124e39817514d4500a8ce5476e95b6018d182b966"), *consensus.BTMAssetID, 40750000000, 5, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40650000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40650000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
                        },
                }),
        }
@@ -267,8 +250,8 @@ func init() {
                                types.NewSpendInput(nil, toHash("ca9b179e549406aa583869e124e39817514d4500a8ce5476e95b6018d182b966"), *consensus.BTMAssetID, 40650000000, 6, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40550000000, []byte("0014e809cb6f328db1e624821dec508cbe08fe1ed08d")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40550000000, []byte("0014e809cb6f328db1e624821dec508cbe08fe1ed08d")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
                        },
                }),
        }
@@ -282,8 +265,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[3].getSourceID(0), *consensus.BTMAssetID, 41150000000, 0, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 41050000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 41050000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014b103d8f2dc10e7bbbe2557ff8b9876524dec0a7e")),
                        },
                }),
        }
@@ -296,8 +279,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[11].getSourceID(0), *consensus.BTMAssetID, 41050000000, 0, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40950000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40950000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("00142b248deeffe82f9cd94fab43849468e0dfe97806")),
                        },
                }),
        }
@@ -310,8 +293,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[12].getSourceID(0), *consensus.BTMAssetID, 40950000000, 0, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40850000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40850000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014492d5b0f09f83bd9bff6a44514dcc9b11c091dce")),
                        },
                }),
        }
@@ -324,8 +307,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[13].getSourceID(0), *consensus.BTMAssetID, 40850000000, 0, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40750000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40750000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014e3bb841fb722d1840a959d86e12a174c54a3a6e8")),
                        },
                }),
        }
@@ -338,8 +321,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[14].getSourceID(0), *consensus.BTMAssetID, 40750000000, 0, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40650000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40650000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("001449601d4cfb6e7a1b990778497b3c364f66bc17d2")),
                        },
                }),
        }
@@ -352,8 +335,8 @@ func init() {
                                types.NewSpendInput(nil, *mockTransaction[15].getSourceID(0), *consensus.BTMAssetID, 40650000000, 0, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
                        },
                        Outputs: []*types.TxOutput{
-                               types.NewTxOutput(*consensus.BTMAssetID, 40550000000, []byte("0014e809cb6f328db1e624821dec508cbe08fe1ed08d")),
-                               types.NewTxOutput(*consensus.BTMAssetID, 100000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 40550000000, []byte("0014e809cb6f328db1e624821dec508cbe08fe1ed08d")),
+                               types.NewIntraChainOutput(*consensus.BTMAssetID, 100000000, []byte("0014bd3d70b1bcd62ece61c06a2fe097a4732e5f006b")),
                        },
                }),
        }
@@ -365,7 +348,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            100,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block0"),
@@ -377,7 +360,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            101,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block1"),
@@ -392,7 +375,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            102,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block2"),
@@ -404,7 +387,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            102,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block3"),
@@ -416,7 +399,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            103,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block4"),
@@ -429,7 +412,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            104,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block5"),
@@ -440,7 +423,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            105,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block6"),
@@ -452,7 +435,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            106,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block7"),
@@ -463,7 +446,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            107,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block8"),
@@ -476,7 +459,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            108,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block9"),
@@ -489,7 +472,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            105,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block10"),
@@ -505,7 +488,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            105,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block11"),
@@ -520,7 +503,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            106,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block12"),
@@ -534,7 +517,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            107,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block13"),
@@ -547,7 +530,7 @@ func init() {
                        BlockHeader: types.BlockHeader{
                                Height:            106,
                                PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
-                               Timestamp:         1522908275,
+                               Timestamp:         1522908275000,
                        },
                        Transactions: []*types.Tx{
                                coinBaseTx(41250000000, "arbitrary block14"),