• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revisiond04142753d519af4a11b5a8e007e54e965aeffcc (tree)
Time2019-07-08 15:20:58
AuthorHAOYUatHZ <haoyu@prot...>
CommiterHAOYUatHZ

Log Message

filter change output

Change Summary

Incremental Difference

--- a/federation/synchron/mainchain_keeper.go
+++ b/federation/synchron/mainchain_keeper.go
@@ -138,11 +138,18 @@ func (m *mainchainKeeper) processBlock(chain *orm.Chain, block *types.Block, txS
138138 }
139139
140140 func (m *mainchainKeeper) isDepositTx(tx *types.Tx) bool {
141+ for _, input := range tx.Inputs {
142+ if bytes.Equal(input.ControlProgram(), m.fedProg) {
143+ return false
144+ }
145+ }
146+
141147 for _, output := range tx.Outputs {
142148 if bytes.Equal(output.OutputCommitment.ControlProgram, m.fedProg) {
143149 return true
144150 }
145151 }
152+
146153 return false
147154 }
148155
Show on old repository browser