Skip to content

Commit b3cec02

Browse files
committed
bip-322: clarify when to return ERROR in verify action
1 parent f0784c6 commit b3cec02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bip-0322.mediawiki

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ The resulting signature proof should be encoded using base64 encoding.
121121
The "Verify" action takes as input a standard flags value, a script sig, an optional witness, and a purpose.
122122
It emits one of INCONCLUSIVE, VALID, INVALID, or ERROR.
123123

124+
While omitted below, ERROR is returned if an unforeseen error occurs at any point in the process. A concrete example of this is if a legacy proof is given as input to a non-legacy address; the deserialization of the proof will fail in this case, and this should result in an ERROR result.
125+
124126
# Obtain the sighash and scriptPubKey from the purpose; pass on result code if not VALID
125127
# Verify Script with flags=consensus flags (currently P2SH, DERSIG, NULLDUMMY, CLTV, CSV, WITNESS), scriptSig=script sig, scriptPubKey=scriptPubKey, witness=witness, and sighash=sighash
126128
# Return INVALID if verification fails

0 commit comments

Comments
 (0)