@@ -598,6 +598,29 @@ static CBlockUndo GetUndoChecked(BlockManager& blockman, const CBlockIndex* pblo
598
598
return blockUndo;
599
599
}
600
600
601
+ const RPCResult getblock_vin{
602
+ RPCResult::Type::ARR, " vin" , " " ,
603
+ {
604
+ {RPCResult::Type::OBJ, " " , " " ,
605
+ {
606
+ {RPCResult::Type::ELISION, " " , " The same output as verbosity = 2" },
607
+ {RPCResult::Type::OBJ, " prevout" , " (Only if undo information is available)" ,
608
+ {
609
+ {RPCResult::Type::BOOL, " generated" , " Coinbase or not" },
610
+ {RPCResult::Type::NUM, " height" , " The height of the prevout" },
611
+ {RPCResult::Type::NUM, " value" , " The value in " + CURRENCY_UNIT},
612
+ {RPCResult::Type::OBJ, " scriptPubKey" , " " ,
613
+ {
614
+ {RPCResult::Type::STR, " asm" , " The asm" },
615
+ {RPCResult::Type::STR, " hex" , " The hex" },
616
+ {RPCResult::Type::STR, " address" , /* optional=*/ true , " The Bitcoin address (only if a well-defined address exists)" },
617
+ {RPCResult::Type::STR, " type" , " The type (one of: " + GetAllOutputTypes () + " )" },
618
+ }},
619
+ }},
620
+ }},
621
+ }
622
+ };
623
+
601
624
static RPCHelpMan getblock ()
602
625
{
603
626
return RPCHelpMan{" getblock" ,
@@ -657,26 +680,7 @@ static RPCHelpMan getblock()
657
680
{
658
681
{RPCResult::Type::OBJ, " " , " " ,
659
682
{
660
- {RPCResult::Type::ARR, " vin" , " " ,
661
- {
662
- {RPCResult::Type::OBJ, " " , " " ,
663
- {
664
- {RPCResult::Type::ELISION, " " , " The same output as verbosity = 2" },
665
- {RPCResult::Type::OBJ, " prevout" , " (Only if undo information is available)" ,
666
- {
667
- {RPCResult::Type::BOOL, " generated" , " Coinbase or not" },
668
- {RPCResult::Type::NUM, " height" , " The height of the prevout" },
669
- {RPCResult::Type::NUM, " value" , " The value in " + CURRENCY_UNIT},
670
- {RPCResult::Type::OBJ, " scriptPubKey" , " " ,
671
- {
672
- {RPCResult::Type::STR, " asm" , " The asm" },
673
- {RPCResult::Type::STR, " hex" , " The hex" },
674
- {RPCResult::Type::STR, " address" , /* optional=*/ true , " The Bitcoin address (only if a well-defined address exists)" },
675
- {RPCResult::Type::STR, " type" , " The type (one of: " + GetAllOutputTypes () + " )" },
676
- }},
677
- }},
678
- }},
679
- }},
683
+ getblock_vin,
680
684
}},
681
685
}},
682
686
}},
0 commit comments