We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9988ba commit a33bcd3Copy full SHA for a33bcd3
bitcoin/src/blockdata/script/tests.rs
@@ -916,3 +916,9 @@ fn instruction_script_num_parse() {
916
Some(Ok(Instruction::PushBytes(PushBytes::empty()))),
917
);
918
}
919
+
920
+#[test]
921
+fn script_push_int_overflow() {
922
+ // Only errors if `data == i32::MIN` (CScriptNum cannot have value -2^31).
923
+ assert_eq!(Builder::new().push_int(i32::MIN), Err(Error::NumericOverflow));
924
+}
0 commit comments