Merge pull request #277 from braydonf/cs-isspent

Added critical section lock in isSpent
This commit is contained in:
Patrick Nagurny 2015-10-02 14:31:39 -04:00
commit 54eae61f1d

View File

@ -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));
}; };