network for miner blocks.

This commit is contained in:
Christopher Jeffrey 2016-05-23 01:31:24 -07:00
parent 3f4e0f5040
commit 2b2a747eab
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -272,7 +272,8 @@ Miner.prototype.createBlock = function createBlock(version, callback) {
coinbaseFlags: self.coinbaseFlags,
witness: self.chain.segwitActive,
parallel: self.options.parallel,
dsha256: self.dsha256
dsha256: self.dsha256,
network: self.network
});
if (!self.mempool)
@ -366,6 +367,7 @@ function MinerBlock(options) {
this.witness = options.witness;
this.address = options.address;
this.witnessNonce = null;
this.network = bcoin.network.get(options.network);
// Create a coinbase
this.coinbase = new bcoin.mtx();
@ -451,7 +453,7 @@ MinerBlock.prototype.updateCommitment = function updateCommitment() {
MinerBlock.prototype.updateCoinbase = function updateCoinbase() {
this.coinbase.inputs[0].script[1] = bcoin.script.array(this.extraNonce);
this.coinbase.outputs[0].value = this.block.getReward();
this.coinbase.outputs[0].value = this.block.getReward(this.network);
};
/**