Skip to content

Commit e2ce548

Browse files
committed
fix hash time lock script
1 parent 139f2c5 commit e2ce548

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

x/lending/types/taproot.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ func createHashTimeLockScript(pubkey string, hashlock string, locktime int64) ([
8080
builder.AddOp(txscript.OP_SHA256) // Add hash lock
8181
builder.AddData(hashBytes) // Push hash
8282
builder.AddOp(txscript.OP_EQUALVERIFY) // Verify hash preimage
83-
builder.AddOp(txscript.OP_DUP) // Duplicate public key for signature verification
84-
builder.AddOp(txscript.OP_HASH160) // Hash public key
85-
builder.AddData(pubKeyBytes) // Replace with actual hash160 of receiver's pubkey
86-
builder.AddOp(txscript.OP_EQUALVERIFY) // Verify public key hash builder.AddOp(txscript.OP_CHECKSIG) // Verify signature
83+
builder.AddData(pubKeyBytes) // Push pubkey
84+
builder.AddOp(txscript.OP_CHECKSIG) // Verify signature
8785
return builder.Script()
8886
}
8987

0 commit comments

Comments
 (0)