* ban status fail for flash swap
* set up init check point
Co-authored-by: paladz <453256728@qq.com>
ProducerSubsidys: []ProducerSubsidy{
{BeginBlock: 1, EndBlock: 63072000, Subsidy: 9512938},
},
- SoftForkPoint: map[uint64]uint64{SoftFork001: 10461600},
+ SoftForkPoint: map[uint64]uint64{SoftFork001: 10461600},
+ MovStartHeight: 42000000,
}
// TestNetParams is the config for vapor-testnet
return errors.Wrapf(validateResult.err, "validate of transaction %d of %d", i, len(b.Transactions))
}
+ // for support flash swap running on vapor, status fail txs need to be
+ // rejected. Or the attacker can steal BTM from any BTM/* trade pair by
+ // using status fail charge fee rule.
+ if b.Height >= consensus.ActiveNetParams.MovStartHeight && validateResult.err != nil {
+ return errors.New("the chain currently didn't support status fail tx")
+ }
+
if err := b.TransactionStatus.SetStatus(i, validateResult.err != nil); err != nil {
return err
}