Closed tigh-latte closed 2 years ago
Merging #82 (7a9c1d1) into master (4f458d2) will increase coverage by
0.58%
. The diff coverage is98.90%
.
@@ Coverage Diff @@
## master #82 +/- ##
==========================================
+ Coverage 83.94% 84.53% +0.58%
==========================================
Files 35 35
Lines 3370 3504 +134
==========================================
+ Hits 2829 2962 +133
- Misses 394 395 +1
Partials 147 147
Impacted Files | Coverage Δ | |
---|---|---|
bscript/interpreter/thread.go | 94.30% <ø> (ø) |
|
bscript/interpreter/number.go | 97.94% <97.94%> (ø) |
|
bscript/interpreter/config.go | 100.00% <100.00%> (ø) |
|
bscript/interpreter/operations.go | 96.54% <100.00%> (+0.38%) |
:arrow_up: |
bscript/interpreter/stack.go | 93.56% <100.00%> (+0.03%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4f458d2...7a9c1d1. Read the comment docs.
Currently, arithmeitc that overflows
math.MaxInt64
and underflowsmath.MinInt64
just causes integer overflows within the script, meaning maths that should be compatible with large numbers just does not work on our interpreter.Also,
OP_NUM2BIN
andOP_BIN2NUM
are implemented incorrectly.To fix this, I've fixed the implementations of the two aforementioned opcodes, and changed the
scriptNum
data type to wrapbig.Int
, implementing the correct math functions and byte conversion both to and from consensus, to and from standard big endian.