mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Add unit tests for peg-in authorization
This commit is contained in:
parent
be735cf397
commit
4aad513939
5 changed files with 143 additions and 4 deletions
|
|
@ -2399,6 +2399,9 @@ bool IsValidPeginWitness(const CScriptWitness& pegin_witness, const COutPoint& p
|
|||
CScript fedpegscript = Params().GetConsensus().fedpegScript;
|
||||
|
||||
// fedpegscript should be multisig or OP_TRUE
|
||||
// When set to OP_TRUE, the witness program can be any valid witness program
|
||||
// as there are no pubkeys to tweak. This means typically in regtest there
|
||||
// is no spending authorization for peg-in inputs.
|
||||
txnouttype type;
|
||||
std::vector<std::vector<unsigned char> > solutions;
|
||||
if (!Solver(fedpegscript, type, solutions) || (type != TX_MULTISIG && type != TX_TRUE)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue