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:
3d74ee4
)
addInputWitness
author
HAOYUatHZ
<haoyu@protonmail.com>
Tue, 18 Jun 2019 08:43:15 +0000
(16:43 +0800)
committer
HAOYUatHZ
<haoyu@protonmail.com>
Tue, 18 Jun 2019 08:43:15 +0000
(16:43 +0800)
federation/warder.go
patch
|
blob
|
history
diff --git
a/federation/warder.go
b/federation/warder.go
index
7c9ebb5
..
f630548
100644
(file)
--- a/
federation/warder.go
+++ b/
federation/warder.go
@@
-233,12
+233,18
@@
func (w *warder) buildMainchainTx(tx *orm.CrossTransaction) (*btmTypes.Tx, strin
return mainchainTx, mainchainTx.ID.String(), nil
}
-// TODO:
func (w *warder) addInputWitness(tx interface{}) {
- switch tx.(type) {
+ witness := [][]byte{w.fedProg}
+ switch tx := tx.(type) {
case *vaporTypes.Tx:
+ for i := range tx.Inputs {
+ tx.SetInputArguments(uint32(i), witness)
+ }
+
case *btmTypes.Tx:
- default:
+ for i := range tx.Inputs {
+ tx.SetInputArguments(uint32(i), witness)
+ }
}
}