Merge pull request #1 from j4ys0n/merge-hackworks

Merge hackworks
This commit is contained in:
Jayson Jacobs 2018-11-26 19:45:37 -07:00 committed by GitHub
commit 8d8b702963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View File

@ -89,7 +89,6 @@ Bitcoin.DEFAULT_CONFIG_SETTINGS = {
rpcallowip: '127.0.0.1',
rpcuser: 'bitcoin',
rpcpassword: 'local321',
disabledeprecation: '1.1.0',
uacomment: 'bitcore'
};
@ -339,7 +338,7 @@ Bitcoin.prototype._loadSpawnConfiguration = function(node) {
this._expandRelativeDatadir();
var spawnOptions = this.options.spawn;
var configPath = path.resolve(spawnOptions.datadir, './zcash.conf');
var configPath = (spawnOptions['configPath']) ? path.resolve(spawnOptions.configPath) : path.resolve(spawnOptions.datadir, './zcash.conf');
log.info('Using zcash config file:', configPath);
@ -2007,6 +2006,19 @@ Bitcoin.prototype.getDetailedTransaction = function(txid, callback) {
tx.nExpiryHeight = result.expiryheight;
}
// Sapling START
if (tx.fOverwintered && tx.version >= 4) {
tx.valueBalance = result.valueBalance;
tx.spendDescs = result.vShieldedSpend;
tx.outputDescs = result.vShieldedOutput;
if (result.bindingSig) {
tx.bindingSig = result.bindingSig;
}
// Update tx.feeSatoshis with custom explorer JSON field 'valueBalanceZat'
tx.feeSatoshis = tx.feeSatoshis + result.valueBalanceZat;
}
// Sapling END
self.transactionDetailedCache.set(txid, tx);
done(null, tx);
});

View File

@ -55,7 +55,7 @@
"dependencies": {
"async": "^1.3.0",
"bitcoind-rpc": "^0.6.0",
"bitcore-lib-zcash": "ianamunoz/bitcore-lib-zcash",
"bitcore-lib-zcash": "zcash-hackworks/bitcore-lib-zcash",
"body-parser": "^1.13.3",
"colors": "^1.1.2",
"commander": "^2.8.1",