Skip to content

Commit 25effc8

Browse files
author
ntrung
committed
fix bitcoinjs-lib for big transaction
1 parent 3534d00 commit 25effc8

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
This is patch for sending transaction with big big amount
2+
3+
BitcoinJs-Lib version 2.3.0
4+
#command:
5+
cp -R patch_big_transaction flashcoin/
6+
7+
#patch 1: flashcoin.io/jspm_packages/npm/[email protected]/src/bufferutils.js
8+
{
9+
line 60:
10+
//verifuint(b + a, 0x001fffffffffffff)
11+
verifuint(b + a, 0x7fffffffffffffff)
12+
...
13+
line 124:
14+
//verifuint(b + a, 0x001fffffffffffff)
15+
verifuint(b + a, 0x7fffffffffffffff)
16+
}
17+
18+
#patch 2: flashcoin.io/jspm_packages/npm/[email protected]/src/types.js
19+
{
20+
line 14:
21+
//var UINT53_MAX = Math.pow(2, 53) - 1
22+
var UINT53_MAX = Math.pow(2, 63) - 1
23+
}
24+
25+
#patch 3: flashcoin.io/jspm_packages/npm/[email protected]/extra.js
26+
{
27+
line 33:
28+
//var UINT53_MAX = Math.pow(2, 53) - 1
29+
var UINT53_MAX = Math.pow(2, 63) - 1
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
This is patch for sending transaction with big big amount
2+
3+
bitcoinjs-lib (version: 4.0.2)
4+
5+
-------
6+
7+
#patch 1: [email protected]/src/bufferutils.js
8+
{
9+
line 14:
10+
//verifuint(b + a, 0x001fffffffffffff)
11+
verifuint(b + a, 0x7fffffffffffffff)
12+
...
13+
line 20:
14+
//verifuint(b + a, 0x001fffffffffffff)
15+
verifuint(value, 0x7fffffffffffffff)
16+
}
17+
18+
#patch 2: [email protected]/src/types.js
19+
{
20+
line 13:
21+
//const SATOSHI_MAX = 21 * 1e14
22+
const SATOSHI_MAX = 9 * 1e18
23+
}
24+
25+
#patch 3: [email protected]/node_modules/[email protected]/extra.js
26+
{
27+
line 42:
28+
//var INT53_MAX = Math.pow(2, 53) - 1
29+
var INT53_MAX = Math.pow(2, 63) - 1
30+
}

0 commit comments

Comments
 (0)