X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Frpcrawtransaction.cpp;fp=src%2Frpcrawtransaction.cpp;h=c2a10f3056fd38b2a699f003594e7f622665274a;hb=62b3df9c02e86432aa73f8b475900946bb348816;hp=127215665ff362b731592f006e423fe1690e82ff;hpb=5d03ac2b46f39453274e84b1f71c64b51d445a26;p=novacoin.git diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index 1272156..c2a10f3 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -296,23 +296,15 @@ Value createrawtransaction(const Array& params, bool fHelp) if (address.IsValid()) { + scriptPubKey.SetAddress(address); + + // Don't perform duplication checking for pubkey-pair addresses if (!address.IsPair()) { - scriptPubKey.SetDestination(address.Get()); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); setAddress.insert(address); } - else - { - CMalleablePubKey mpk; - if (!mpk.setvch(address.GetData())) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid output destination: ")+s.name_); - - CPubKey R, pubKeyVariant; - mpk.GetVariant(R, pubKeyVariant); - scriptPubKey.SetDestination(R, pubKeyVariant); - } } else throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid output destination: ")+s.name_);