Merge pull request #277 from braydonf/cs-isspent
Added critical section lock in isSpent
This commit is contained in:
commit
54eae61f1d
@ -1231,6 +1231,8 @@ NAN_METHOD(IsSpent) {
|
|||||||
const uint256 txid = uint256S(argStr);
|
const uint256 txid = uint256S(argStr);
|
||||||
int outputIndex = info[1]->IntegerValue();
|
int outputIndex = info[1]->IntegerValue();
|
||||||
|
|
||||||
|
{
|
||||||
|
LOCK(mempool.cs);
|
||||||
CCoinsView dummy;
|
CCoinsView dummy;
|
||||||
CCoinsViewCache view(&dummy);
|
CCoinsViewCache view(&dummy);
|
||||||
|
|
||||||
@ -1244,6 +1246,7 @@ NAN_METHOD(IsSpent) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
info.GetReturnValue().Set(New<Boolean>(true));
|
info.GetReturnValue().Set(New<Boolean>(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user