Allow NULL keystore to actually work

This commit is contained in:
miketout
2018-10-13 21:03:47 -07:00
parent 51848bbce5
commit 6c621e0e43
4 changed files with 7 additions and 4 deletions

View File

@@ -60,7 +60,10 @@ void TransactionBuilder::AddSaplingOutput(
void TransactionBuilder::AddTransparentInput(COutPoint utxo, CScript scriptPubKey, CAmount value)
{
if (keystore == nullptr) {
throw std::runtime_error("Cannot add transparent inputs to a TransactionBuilder without a keystore");
if (!scriptPubKey.IsPayToCryptoCondition())
{
throw std::runtime_error("Cannot add transparent inputs to a TransactionBuilder without a keystore, except with crypto conditions");
}
}
mtx.vin.emplace_back(utxo);