Merge pull request #406 from braydonf/getinfo-network
Added network name to bitcoind.getInfo
This commit is contained in:
commit
4529c3013d
@ -477,6 +477,7 @@ describe('Daemon Binding Functionality', function() {
|
||||
describe('#getInfo', function() {
|
||||
it('will get information', function() {
|
||||
var info = bitcoind.getInfo();
|
||||
info.network.should.equal('regtest');
|
||||
should.exist(info);
|
||||
should.exist(info.version);
|
||||
should.exist(info.blocks);
|
||||
|
||||
@ -1418,6 +1418,7 @@ NAN_METHOD(GetInfo) {
|
||||
Nan::Set(obj, New("connections").ToLocalChecked(), New<Number>((int)vNodes.size())->ToInt32());
|
||||
Nan::Set(obj, New("difficulty").ToLocalChecked(), New<Number>((double)GetDifficulty()));
|
||||
Nan::Set(obj, New("testnet").ToLocalChecked(), New<Boolean>(Params().NetworkIDString() == "test"));
|
||||
Nan::Set(obj, New("network").ToLocalChecked(), New<String>(Params().NetworkIDString()).ToLocalChecked());
|
||||
Nan::Set(obj, New("relayfee").ToLocalChecked(), New<Number>(::minRelayTxFee.GetFeePerK())); // double
|
||||
Nan::Set(obj, New("errors").ToLocalChecked(), New(GetWarnings("statusbar")).ToLocalChecked());
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user