• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版5202c34408f3ca21a992218316efe484ade7fea5 (tree)
时间2019-11-29 21:40:20
作者paladz <453256728@qq.c...>
Commiterpaladz

Log Message

edit logic

更改概述

差异

--- a/consensus/segwit/segwit.go
+++ b/consensus/segwit/segwit.go
@@ -86,6 +86,10 @@ func IsP2WMCScript(prog []byte) bool {
8686 if _, err = vm.AsInt64(insts[3].Data); err != nil {
8787 return false
8888 }
89+
90+ if !IsP2WScript(insts[4].Data) {
91+ return false
92+ }
8993 return insts[5].Op == vm.OP_DATA_32 && len(insts[5].Data) == 32
9094 }
9195
@@ -149,9 +153,6 @@ func DecodeP2WMCProgram(prog []byte) (*vmutil.MagneticContractArgs, error) {
149153 return nil, err
150154 }
151155
152- if !IsP2WScript(magneticContractArgs.SellerProgram) {
153- return nil, errors.New("contract seller program need to be P2WScript")
154- }
155156 return magneticContractArgs, nil
156157 }
157158
Show on old repository browser