Skip to content

Commit 850c142

Browse files
buoxpdlf1004
authored andcommitted
Upgrade CodeChain SDK to 0.1.0-alpha.9
The getBlockNumber() method was renamed to getBestBlockNumber() in the latest SDK, and it caused `Method not found` error during the synchronization with the CodeChain. This commit upgrades the CodeChain SDK version to the latest one and fixes the issue.
1 parent 2932ea0 commit 850c142

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"bootstrap": "^4.1.1",
1818
"case-sensitive-paths-webpack-plugin": "2.1.1",
1919
"chalk": "1.1.3",
20-
"codechain-sdk": "^0.1.0-alpha.7",
20+
"codechain-sdk": "^0.1.0-alpha.9",
2121
"config": "^1.30.0",
2222
"cors": "^2.8.4",
2323
"css-loader": "0.28.7",

worker/CodeChainAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class CodeChainAgent {
77
}
88

99
public getLastBlockNumber = async (): Promise<number> => {
10-
return this.sdk.getBlockNumber();
10+
return this.sdk.getBestBlockNumber();
1111
}
1212

1313
public getBlock = async (blockNumber): Promise<Block> => {

yarn.lock

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,9 +1637,9 @@ code-point-at@^1.0.0:
16371637
version "1.1.0"
16381638
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
16391639

1640-
codechain-sdk@^0.1.0-alpha.7:
1641-
version "0.1.0-alpha.7"
1642-
resolved "https://registry.yarnpkg.com/codechain-sdk/-/codechain-sdk-0.1.0-alpha.7.tgz#2e5e1cb8ab23132b1df44acafef750da3cdaea06"
1640+
codechain-sdk@^0.1.0-alpha.9:
1641+
version "0.1.0-alpha.9"
1642+
resolved "https://registry.yarnpkg.com/codechain-sdk/-/codechain-sdk-0.1.0-alpha.9.tgz#457bebea47672b7678718e56d6572bb00c46e340"
16431643
dependencies:
16441644
bignumber.js "^6.0.0"
16451645
blakejs "^1.1.0"
@@ -1699,10 +1699,14 @@ combined-stream@1.0.6, combined-stream@~1.0.5:
16991699
dependencies:
17001700
delayed-stream "~1.0.0"
17011701

1702-
commander@2.15.x, commander@^2.12.1, commander@^2.12.2, commander@~2.15.0:
1702+
commander@2.15.x, commander@^2.12.1, commander@~2.15.0:
17031703
version "2.15.1"
17041704
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
17051705

1706+
commander@^2.12.2:
1707+
version "2.16.0"
1708+
resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50"
1709+
17061710
commander@~2.13.0:
17071711
version "2.13.0"
17081712
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
@@ -3260,8 +3264,8 @@ hash-base@^3.0.0:
32603264
safe-buffer "^5.0.1"
32613265

32623266
hash.js@^1.0.0, hash.js@^1.0.3:
3263-
version "1.1.3"
3264-
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846"
3267+
version "1.1.4"
3268+
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.4.tgz#8b50e1f35d51bd01e5ed9ece4dbe3549ccfa0a3c"
32653269
dependencies:
32663270
inherits "^2.0.3"
32673271
minimalistic-assert "^1.0.0"
@@ -6352,8 +6356,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2:
63526356
inherits "^2.0.1"
63536357

63546358
rlp@^2.0.0:
6355-
version "2.0.0"
6356-
resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.0.0.tgz#9db384ff4b89a8f61563d92395d8625b18f3afb0"
6359+
version "2.1.0"
6360+
resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.1.0.tgz#e4f9886d5a982174f314543831e36e1a658460f9"
6361+
dependencies:
6362+
safe-buffer "^5.1.1"
63576363

63586364
rsvp@^3.3.3:
63596365
version "3.6.2"
@@ -7463,10 +7469,14 @@ uuid@^2.0.2:
74637469
version "2.0.3"
74647470
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
74657471

7466-
uuid@^3.1.0, uuid@^3.2.1:
7472+
uuid@^3.1.0:
74677473
version "3.2.1"
74687474
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
74697475

7476+
uuid@^3.2.1:
7477+
version "3.3.2"
7478+
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
7479+
74707480
validate-npm-package-license@^3.0.1:
74717481
version "3.0.3"
74727482
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338"

0 commit comments

Comments
 (0)