shuijian-xu / bitcoin

0 stars 0 forks source link

two ways p2pkh script can fail #173

Open shuijian-xu opened 4 years ago

shuijian-xu commented 4 years ago
  1. If the ScriptSig provides a public key that does not hash160 to the 20-byte hash in the ScriptPubKey, the script will fail at OP_EQUALVERIFY

  2. If the ScriptSig has a public key that hash160s to the 20-byte hash in the ScriptPubKey, but has an invalid signature. That would end the combined script evaluation with a 0, ending in failure.