OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2cc60a
)
opt
author
HAOYUatHZ
<haoyu@protonmail.com>
Tue, 18 Jun 2019 09:11:30 +0000
(17:11 +0800)
committer
HAOYUatHZ
<haoyu@protonmail.com>
Tue, 18 Jun 2019 09:11:30 +0000
(17:11 +0800)
federation/synchron/sidechain_keeper.go
patch
|
blob
|
history
diff --git
a/federation/synchron/sidechain_keeper.go
b/federation/synchron/sidechain_keeper.go
index
214c95c
..
8179b82
100644
(file)
--- a/
federation/synchron/sidechain_keeper.go
+++ b/
federation/synchron/sidechain_keeper.go
@@
-210,13
+210,8
@@
func (s *sidechainKeeper) processWithdrawalTx(chain *orm.Chain, block *types.Blo
return err
}
- for _, output := range crossChainOutputs {
- if err := s.db.Create(output).Error; err != nil {
- return errors.Wrap(err, fmt.Sprintf("create WithdrawalFromSidechain output: txid(%s), pos(%d)", tx.ID.String(), output.SourcePos))
- }
- }
-
- return nil
+ // batch insert
+ return s.db.Create(crossChainOutputs).Error
}
func (s *sidechainKeeper) getCrossChainReqs(crossTransactionID uint64, tx *types.Tx, statusFail bool) ([]*orm.CrossTransactionReq, error) {