rpc: submitblock logs.

This commit is contained in:
Christopher Jeffrey 2016-12-15 15:38:27 -08:00
parent 559cc3592d
commit 6d1eb9fd36
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1451,8 +1451,9 @@ RPC.prototype._submitblock = co(function* submitblock(block) {
});
RPC.prototype.__submitblock = co(function* submitblock(block) {
if (block.prevBlock !== this.chain.tip.hash)
return 'rejected: inconclusive-not-best-prevblk';
this.logger.info('Handling submitted block: %s.', block.rhash());
this.logger.debug('Coinbase:');
this.logger.debug(block.txs[0]);
try {
yield this.chain.add(block);