config: expose index-tx and index-address.

This commit is contained in:
Christopher Jeffrey 2016-08-04 13:44:45 -07:00
parent 2ada7b9e90
commit 3cbc5e2726
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
5 changed files with 14 additions and 4 deletions

View File

@ -22,6 +22,8 @@ db: leveldb
# prune: false
use-checkpoints: true
coin-cache: true
index-tx: false
index-address: false
# Mempool
# limit-free: true

View File

@ -401,7 +401,7 @@ Chain.prototype.verify = function verify(block, prev, callback) {
// Blocks that do not commit to
// witness data cannot contain it.
if (!commitmentHash) {
if (!commitmentHash && self.options.witness) {
if (block.hasWitness()) {
return callback(new VerifyError(block,
'invalid',
@ -540,6 +540,9 @@ Chain.prototype.getDeployments = function getDeployments(block, prev, ancestors,
});
},
function(next) {
if (self.network.oldWitness)
return next();
// Segregrated witness is now usable (bip141 - segnet4)
self.isActive(prev, 'witness', function(err, active) {
if (err)

View File

@ -134,6 +134,8 @@ config.parseData = function parseData(data) {
options.prune = bool(data.prune);
options.useCheckpoints = bool(data.usecheckpoints);
options.coinCache = bool(data.coincache);
options.indexTX = bool(data.indextx);
options.indexAddress = bool(data.indexaddress);
// Mempool
options.limitFree = bool(data.limitfree);

View File

@ -64,7 +64,9 @@ function Fullnode(options) {
witness: this.options.witness,
prune: this.options.prune,
useCheckpoints: this.options.useCheckpoints,
coinCache: this.options.coinCache
coinCache: this.options.coinCache,
indexTX: this.options.indexTX,
indexAddress: this.options.indexAddress
});
// Fee estimation.
@ -85,7 +87,8 @@ function Fullnode(options) {
limitFreeRelay: this.options.limitFreeRelay,
requireStandard: this.options.requireStandard,
rejectInsaneFees: this.options.rejectInsaneFees,
replaceByFee: this.options.replaceByFee
replaceByFee: this.options.replaceByFee,
indexAddress: this.options.indexAddress
});
// Pool needs access to the chain and mempool.

View File

@ -2112,7 +2112,7 @@ RPC.prototype.dumpwallet = function dumpwallet(args, callback) {
address = ring.getAddress('base58');
fmt = '%s %s label= addr=%s';
if (address.change)
if (ring.change)
fmt = '%s %s change=1 addr=%s';
str = utils.fmt(fmt, key.toSecret(), time, address);