Commit cc2f7e5e75589bab19cc4621f39f35fe4eb262d3
U256: make state immutable (only have add/sub)
Alex Beregszaszi committed on 8/13/2016, 1:47:00 AMParent: 09322f9afeed6b6067f6406a47eb0197084a20c3
Files changed
u256.js | changed |
u256.js | ||
---|---|---|
@@ -20,14 +20,14 @@ | ||
20 | 20 | toBuffer () { |
21 | 21 | return this._value.toBuffer('be', 32) |
22 | 22 | } |
23 | 23 | |
24 | - subi (u256) { | |
25 | - this._value.subi(u256._value) | |
24 | + sub (u256) { | |
25 | + return this._value.sub(u256._value) | |
26 | 26 | } |
27 | 27 | |
28 | - addi (u256) { | |
29 | - this._value.addi(u256._value) | |
28 | + add (u256) { | |
29 | + return this._value.add(u256._value) | |
30 | 30 | } |
31 | 31 | |
32 | 32 | lt (u256) { |
33 | 33 | return this._value.lt(u256._value) |
Built with git-ssb-web