fix: update opcode descriptions for OP_2OVER and OP_3DUP
What changed, and why it matters
This commit fixes two typos/grammar mistakes in plain-text documentation comments describing Bitcoin script opcodes. The actual code behavior is unchanged; only the human-readable descriptions were corrected.
No security action needed. Treat as a normal documentation cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change updates doc comments for OP_3DUP and OP_2OVER in bitcoin/src/blockdata/opcodes.rs. OP_3DUP’s description is corrected from ‘the two three stack items’ to ‘the top three stack items’, and OP_2OVER’s description is rewritten for clarity. No executable code, constants, or logic were modified.
Changed components
bitcoin/src/blockdata/opcodes.rs documentation commentsInspect captured patch +2 / −2
diff --git a/bitcoin/src/blockdata/opcodes.rs b/bitcoin/src/blockdata/opcodes.rs
index 8e74c963..96b8856c 100644
--- a/bitcoin/src/blockdata/opcodes.rs
+++ b/bitcoin/src/blockdata/opcodes.rs
@@ -185,8 +185,8 @@ all_opcodes! {
OP_FROMALTSTACK => 0x6c, "Pop one element from the alt stack onto the main stack.";
OP_2DROP => 0x6d, "Drops the top two stack items.";
OP_2DUP => 0x6e, "Duplicates the top two stack items as `AB` -> `ABAB`.";
- OP_3DUP => 0x6f, "Duplicates the two three stack items as `ABC` -> `ABCABC`.";
- OP_2OVER => 0x70, "Copies the two stack items of items two spaces back to the front, as `xxAB` -> `ABxxAB`.";
+ OP_3DUP => 0x6f, "Duplicates the top three stack items as `ABC` -> `ABCABC`.";
+ OP_2OVER => 0x70, "Duplicates the third and fourth items from the top of the stack.";
OP_2ROT => 0x71, "Moves the two stack items four spaces back to the front, as `xxxxAB` -> `ABxxxx`.";
OP_2SWAP => 0x72, "Swaps the top two pairs, as `ABCD` -> `CDAB`.";
OP_IFDUP => 0x73, "Duplicate the top stack element unless it is zero.";
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.