Added critical section lock in isSpent
This commit is contained in:
parent
76d466b29b
commit
7070d4c74d
@ -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