Transactions: []*types.Tx{
mock.Eos2EtcMakerTxs[0],
mock.Btc2EthMakerTxs[0],
+ mock.Eth2BtcMakerTxs[1],
mock.MatchedTxs[4],
mock.Eth2EosMakerTxs[0],
- mock.Eth2BtcMakerTxs[1],
- mock.MatchedTxs[5],
mock.Etc2EosMakerTxs[0],
+ mock.MatchedTxs[5],
},
},
blockFunc: applyBlock,
wantDBState: &common.MovDatabaseState{Height: 2, Hash: hashPtr(testutil.MustDecodeHash("88dbcde57bb2b53b107d7494f20f1f1a892307a019705980c3510890449c0020"))},
},
{
+ desc: "apply block has partial matched transaction chain",
+ block: &types.Block{
+ BlockHeader: types.BlockHeader{Height: 2, PreviousBlockHash: initBlockHeader.Hash()},
+ Transactions: []*types.Tx{
+ mock.Btc2EthMakerTxs[0],
+ mock.Eth2BtcMakerTxs[1],
+ mock.MatchedTxs[4],
+ mock.Eth2BtcMakerTxs[0],
+ mock.MatchedTxs[7],
+ },
+ },
+ blockFunc: applyBlock,
+ initOrders: []*common.Order{},
+ wantOrders: []*common.Order{mock.MustNewOrderFromOutput(mock.MatchedTxs[7], 2)},
+ wantDBState: &common.MovDatabaseState{Height: 2, Hash: hashPtr(testutil.MustDecodeHash("88dbcde57bb2b53b107d7494f20f1f1a892307a019705980c3510890449c0020"))},
+ },
+ {
desc: "detach block has pending order transaction",
block: &types.Block{
BlockHeader: *initBlockHeader,