Update 17_3_getinfo.js

This commit is contained in:
Shannon Appelcline 2020-09-02 14:08:35 -10:00 committed by GitHub
parent bfefdcdc54
commit fb4fabe88e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
const RpcAgent = require('bcrpc'); const RpcAgent = require('bcrpc');
agent = new RpcAgent({port: 18332, user: 'StandUp', pass: '6305f1b2dbb3bc5a16cd0f4aac7e1eba'}); agent = new RpcAgent({port: 18332, user: 'StandUp', pass: '6305f1b2dbb3bc5a16cd0
f4aac7e1eba'});
agent.getBlockCount(function (err, blockCount) { agent.getBlockCount(function (err, blockCount) {
if (err) if (err)
@ -10,6 +11,12 @@ agent.getBlockCount(function (err, blockCount) {
if (err) if (err)
throw Error(JSON.stringify(err)); throw Error(JSON.stringify(err));
console.log(hash.result); console.log(hash.result);
}) });
agent.getWalletInfo(function (err, walletInfo) {
if (err)
throw Error(JSON.stringify(err));
console.log(walletInfo.result);
});
}); });