minor optimization.
This commit is contained in:
parent
408102949c
commit
7e5b6a2ff7
@ -849,8 +849,7 @@ Chain.prototype._checkInputs = function _checkInputs(block, prev, state, callbac
|
||||
utils.forEachSerial(block.txs, function(tx, next) {
|
||||
// Ensure tx is not double spending an output.
|
||||
if (!tx.isCoinbase()) {
|
||||
view.fill(tx);
|
||||
if (!tx.hasCoins()) {
|
||||
if (!view.fillCoins(tx)) {
|
||||
assert(!historical, 'BUG: Spent inputs in historical data!');
|
||||
return next(new VerifyError(block,
|
||||
'invalid',
|
||||
|
||||
@ -102,7 +102,7 @@ CoinView.prototype.spend = function spend(hash, index) {
|
||||
* @returns {Boolean} True if all inputs were filled.
|
||||
*/
|
||||
|
||||
CoinView.prototype.fill = function fill(tx) {
|
||||
CoinView.prototype.fillCoins = function fillCoins(tx) {
|
||||
var res = true;
|
||||
var i, input, prevout;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user