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) {
|
utils.forEachSerial(block.txs, function(tx, next) {
|
||||||
// Ensure tx is not double spending an output.
|
// Ensure tx is not double spending an output.
|
||||||
if (!tx.isCoinbase()) {
|
if (!tx.isCoinbase()) {
|
||||||
view.fill(tx);
|
if (!view.fillCoins(tx)) {
|
||||||
if (!tx.hasCoins()) {
|
|
||||||
assert(!historical, 'BUG: Spent inputs in historical data!');
|
assert(!historical, 'BUG: Spent inputs in historical data!');
|
||||||
return next(new VerifyError(block,
|
return next(new VerifyError(block,
|
||||||
'invalid',
|
'invalid',
|
||||||
|
|||||||
@ -102,7 +102,7 @@ CoinView.prototype.spend = function spend(hash, index) {
|
|||||||
* @returns {Boolean} True if all inputs were filled.
|
* @returns {Boolean} True if all inputs were filled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CoinView.prototype.fill = function fill(tx) {
|
CoinView.prototype.fillCoins = function fillCoins(tx) {
|
||||||
var res = true;
|
var res = true;
|
||||||
var i, input, prevout;
|
var i, input, prevout;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user