@@ -96,34 +96,6 @@ std::vector<std::string> InitialiseAddresses()
96
96
return params.InitialiseAddresses ();
97
97
}
98
98
99
- /* * Checks if any given address is a current master key (invoked by RPC) */
100
- bool CFluid::IsGivenKeyMaster (const CDynamicAddress& inputKey)
101
- {
102
- if (!inputKey.IsValid ()) {
103
- return false ;
104
- }
105
-
106
- std::vector<std::string> fluidSovereigns;
107
- GetLastBlockIndex (chainActive.Tip ());
108
- CBlockIndex* pindex = chainActive.Tip ();
109
-
110
- if (pindex != NULL ) {
111
- // TODO fluid
112
- fluidSovereigns = InitialiseAddresses (); // pindex->fluidParams.fluidSovereigns;
113
- }
114
-
115
- else
116
- fluidSovereigns = InitialiseAddresses ();
117
-
118
- for (const std::string& strAddress : fluidSovereigns) {
119
- CDynamicAddress attemptKey (strAddress);
120
- if (attemptKey.IsValid () && inputKey == attemptKey)
121
- return true ;
122
- }
123
-
124
- return false ;
125
- }
126
-
127
99
std::vector<std::string> CFluidParameters::InitialiseAddresses ()
128
100
{
129
101
std::vector<std::string> initialSovereignAddresses;
@@ -518,7 +490,7 @@ bool CFluid::ParseMintKey(const int64_t& nTime, CDynamicAddress& destination, CA
518
490
return true ;
519
491
}
520
492
521
- static bool GetFluidBlock (const CBlockIndex* pblockindex, CBlock& block)
493
+ bool GetFluidBlock (const CBlockIndex* pblockindex, CBlock& block)
522
494
{
523
495
if (pblockindex != nullptr ) {
524
496
// Check for invalid block position and file.
@@ -554,56 +526,6 @@ bool CFluid::GetMintingInstructions(const CBlockIndex* pblockindex, CDynamicAddr
554
526
return false ;
555
527
}
556
528
557
- bool CFluid::GetProofOverrideRequest (const CBlockIndex* pblockindex, CAmount& coinAmount)
558
- {
559
- CBlock block;
560
- if (GetFluidBlock (pblockindex, block)) {
561
- for (const CTransactionRef& tx : block.vtx ) {
562
- for (const CTxOut& txout : tx->vout ) {
563
- if (txout.scriptPubKey .IsProtocolInstruction (MINING_MODIFY_TX)) {
564
- std::string message;
565
- if (CheckIfQuorumExists (ScriptToAsmStr (txout.scriptPubKey ), message))
566
- return GenericParseNumber (ScriptToAsmStr (txout.scriptPubKey ), block.nTime , coinAmount);
567
- }
568
- }
569
- }
570
- }
571
- return false ;
572
- }
573
-
574
- bool CFluid::GetDynodeOverrideRequest (const CBlockIndex* pblockindex, CAmount& coinAmount)
575
- {
576
- CBlock block;
577
- if (GetFluidBlock (pblockindex, block)) {
578
- for (const CTransactionRef& tx : block.vtx ) {
579
- for (const CTxOut& txout : tx->vout ) {
580
- if (txout.scriptPubKey .IsProtocolInstruction (DYNODE_MODFIY_TX)) {
581
- std::string message;
582
- if (CheckIfQuorumExists (ScriptToAsmStr (txout.scriptPubKey ), message))
583
- return GenericParseNumber (ScriptToAsmStr (txout.scriptPubKey ), block.nTime , coinAmount);
584
- }
585
- }
586
- }
587
- }
588
- return false ;
589
- }
590
-
591
- void CFluid::AddFluidTransactionsToRecord (const CBlockIndex* pblockindex, std::vector<std::string>& transactionRecord)
592
- {
593
- CBlock block;
594
- if (GetFluidBlock (pblockindex, block)) {
595
- for (const CTransactionRef& tx : block.vtx ) {
596
- for (const CTxOut& txout : tx->vout ) {
597
- if (IsTransactionFluid (txout.scriptPubKey )) {
598
- if (!InsertTransactionToRecord (txout.scriptPubKey , transactionRecord)) {
599
- LogPrintf (" AddFluidTransactionsToRecord(): Script Database Entry: %s , FAILED!\n " , ScriptToAsmStr (txout.scriptPubKey ));
600
- }
601
- }
602
- }
603
- }
604
- }
605
- }
606
-
607
529
/* Check if transaction exists in record */
608
530
bool CFluid::CheckTransactionInRecord (const CScript& fluidInstruction, CBlockIndex* pindex)
609
531
{
@@ -627,29 +549,6 @@ bool CFluid::CheckTransactionInRecord(const CScript& fluidInstruction, CBlockInd
627
549
return false ;
628
550
}
629
551
630
- /* Insertion of transaction script to record */
631
- bool CFluid::InsertTransactionToRecord (const CScript& fluidInstruction, std::vector<std::string>& transactionRecord)
632
- {
633
- std::string verificationString;
634
-
635
- if (IsTransactionFluid (fluidInstruction)) {
636
- verificationString = ScriptToAsmStr (fluidInstruction);
637
-
638
- std::string message;
639
- if (CheckIfQuorumExists (verificationString, message)) {
640
- for (const std::string& existingRecord : transactionRecord) {
641
- if (existingRecord == verificationString) {
642
- return false ;
643
- }
644
- }
645
- transactionRecord.push_back (verificationString);
646
- return true ;
647
- }
648
- }
649
-
650
- return false ;
651
- }
652
-
653
552
CAmount GetStandardPoWBlockPayment (const int nHeight)
654
553
{
655
554
if (nHeight == 1 ) {
0 commit comments