OSDN Git Service

validate_matched_tx_sequence_test
authorshenao78 <shenao.78@163.com>
Wed, 12 Feb 2020 08:45:25 +0000 (16:45 +0800)
committershenao78 <shenao.78@163.com>
Wed, 12 Feb 2020 08:45:25 +0000 (16:45 +0800)
application/mov/mov_core_test.go

index 825507d..f084d34 100644 (file)
@@ -646,7 +646,7 @@ func TestValidateMatchedTxSequence(t *testing.T) {
                        wantError:    errSpendOutputIDIsIncorrect,
                },
                {
-                       desc:         "package the matched tx",
+                       desc:         "package full matched tx from maker tx",
                        initOrders:   []*common.Order{},
                        transactions: []*types.Tx{mock.Btc2EthMakerTxs[0], mock.Eth2BtcMakerTxs[1], mock.MatchedTxs[4]},
                        wantError:    nil,
@@ -687,6 +687,12 @@ func TestValidateMatchedTxSequence(t *testing.T) {
                        transactions: []*types.Tx{mock.MatchedTxs[9], mock.MatchedTxs[1]},
                        wantError:    nil,
                },
+               {
+                       desc:         "package partial matched tx from db orders",
+                       initOrders:   []*common.Order{mock.Btc2EthOrders[0], mock.Btc2EthOrders[1], mock.Eth2BtcOrders[2]},
+                       transactions: []*types.Tx{mock.MatchedTxs[2], mock.MatchedTxs[3]},
+                       wantError:    nil,
+               },
        }
 
        for i, c := range cases {