"encoding/hex"
"github.com/vapor/consensus"
- "github.com/vapor/consensus/difficulty"
"github.com/vapor/protocol/bc"
"github.com/vapor/protocol/bc/types"
"github.com/vapor/protocol/state"
Height: header.Height,
PreviousBlockHash: *header.PreviousBlockId,
Timestamp: header.Timestamp,
- Bits: header.Bits,
- Nonce: header.Nonce,
}
return &state.BlockNode{
Parent: nil,
Hash: h.Hash(),
- WorkSum: difficulty.CalcWork(h.Bits),
Version: h.Version,
Height: h.Height,
Timestamp: h.Timestamp,
- Nonce: h.Nonce,
- Bits: h.Bits,
}
}
Height: 100,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block0"),
Height: 101,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block1"),
Height: 102,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block2"),
Height: 102,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block3"),
Height: 103,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block4"),
Height: 104,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block5"),
Height: 105,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block6"),
Height: 106,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block7"),
Height: 107,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block8"),
Height: 108,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block9"),
Height: 105,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block10"),
Height: 105,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block11"),
Height: 106,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block12"),
Height: 107,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block13"),
Height: 106,
PreviousBlockHash: testutil.MustDecodeHash("0ab29c0bd7bff3b3b7eb98802f8d5f8833884c86c0fb21559a65cc58dda99667"),
Timestamp: 1522908275,
- Nonce: 0,
},
Transactions: []*types.Tx{
coinBaseTx(41250000000, "arbitrary block14"),