mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
getrawtransaction: scriptpubkey type is 'fee'
This commit is contained in:
parent
8c15763b7f
commit
f86b32e80d
3 changed files with 9 additions and 5 deletions
|
|
@ -35,6 +35,7 @@ const char* GetTxnOutputType(txnouttype t)
|
|||
case TX_WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash";
|
||||
case TX_WITHDRAW_LOCK: return "withdraw";
|
||||
case TX_TRUE: return "true";
|
||||
case TX_FEE: return "fee";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -70,6 +71,11 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
|
|||
return true;
|
||||
}
|
||||
|
||||
if (scriptPubKey == CScript()) {
|
||||
typeRet = TX_FEE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int witnessversion;
|
||||
std::vector<unsigned char> witnessprogram;
|
||||
if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
|
||||
|
|
@ -229,7 +235,7 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto
|
|||
vector<valtype> vSolutions;
|
||||
if (!Solver(scriptPubKey, typeRet, vSolutions))
|
||||
return false;
|
||||
if (typeRet == TX_NULL_DATA || typeRet == TX_WITHDRAW_LOCK){
|
||||
if (typeRet == TX_NULL_DATA || typeRet == TX_WITHDRAW_LOCK || typeRet == TX_FEE){
|
||||
// This is data, not addresses
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ enum txnouttype
|
|||
TX_WITNESS_V0_KEYHASH,
|
||||
TX_WITHDRAW_LOCK,
|
||||
TX_TRUE,
|
||||
TX_FEE,
|
||||
};
|
||||
|
||||
class CNoDestination {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue