do not allow coinbases in mempool on reorgs.
This commit is contained in:
parent
fd6b315756
commit
1e0b585f10
@ -159,6 +159,10 @@ Mempool.prototype.addBlock = function addBlock(block, callback, force) {
|
|||||||
utils.forEachSerial(block.txs, function(tx, next) {
|
utils.forEachSerial(block.txs, function(tx, next) {
|
||||||
var hash = tx.hash('hex');
|
var hash = tx.hash('hex');
|
||||||
var copy;
|
var copy;
|
||||||
|
|
||||||
|
if (tx.isCoinbase())
|
||||||
|
return next();
|
||||||
|
|
||||||
self.getTX(hash, function(err, existing) {
|
self.getTX(hash, function(err, existing) {
|
||||||
if (err)
|
if (err)
|
||||||
return callback(err);
|
return callback(err);
|
||||||
@ -195,6 +199,10 @@ Mempool.prototype.removeBlock = function removeBlock(block, callback, force) {
|
|||||||
|
|
||||||
utils.forEachSerial(block.txs.slice().reverse(), function(tx, next) {
|
utils.forEachSerial(block.txs.slice().reverse(), function(tx, next) {
|
||||||
var copy;
|
var copy;
|
||||||
|
|
||||||
|
if (tx.isCoinbase())
|
||||||
|
return next();
|
||||||
|
|
||||||
self.hasTX(tx.hash('hex'), function(err, result) {
|
self.hasTX(tx.hash('hex'), function(err, result) {
|
||||||
if (err)
|
if (err)
|
||||||
return next(err);
|
return next(err);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user