@@ -136,26 +136,20 @@ void masternode_list_help()
136
136
" 2. \" filter\" (string, optional) Filter results. Partial match by outpoint by default in all modes,\n "
137
137
" additional matches in some modes are also available\n "
138
138
" \n Available modes:\n "
139
- " activeseconds - Print number of seconds masternode recognized by the network as enabled\n "
140
- " (since latest issued \" masternode start/start-many/start-alias\" )\n "
141
139
" addr - Print ip address associated with a masternode (can be additionally filtered, partial match)\n "
142
- " daemon - Print daemon version of a masternode (can be additionally filtered, exact match)\n "
143
- " full - Print info in format 'status protocol payee lastseen activeseconds lastpaidtime lastpaidblock IP'\n "
140
+ " full - Print info in format 'status payee lastpaidtime lastpaidblock IP'\n "
144
141
" (can be additionally filtered, partial match)\n "
145
- " info - Print info in format 'status protocol payee lastseen activeseconds sentinelversion sentinelstate IP'\n "
142
+ " info - Print info in format 'status payee IP'\n "
146
143
" (can be additionally filtered, partial match)\n "
147
144
" json - Print info in JSON format (can be additionally filtered, partial match)\n "
148
145
" lastpaidblock - Print the last block height a node was paid on the network\n "
149
146
" lastpaidtime - Print the last time a node was paid on the network\n "
150
- " lastseen - Print timestamp of when a masternode was last seen on the network\n "
151
147
" payee - Print Dash address associated with a masternode (can be additionally filtered,\n "
152
148
" partial match)\n "
153
- " protocol - Print protocol of a masternode (can be additionally filtered, exact match)\n "
154
149
" keyid - Print the masternode (not collateral) key id\n "
155
150
" rank - Print rank of a masternode based on current block\n "
156
- " sentinel - Print sentinel version of a masternode (can be additionally filtered, exact match)\n "
157
- " status - Print masternode status: PRE_ENABLED / ENABLED / EXPIRED / SENTINEL_PING_EXPIRED / NEW_START_REQUIRED /\n "
158
- " UPDATE_REQUIRED / POSE_BAN / OUTPOINT_SPENT (can be additionally filtered, partial match)\n "
151
+ " status - Print masternode status: ENABED / POSE_BAN / OUTPOINT_SPENT\n "
152
+ " (can be additionally filtered, partial match)\n "
159
153
);
160
154
}
161
155
@@ -819,10 +813,10 @@ UniValue masternodelist(const JSONRPCRequest& request)
819
813
if (request.params .size () == 2 ) strFilter = request.params [1 ].get_str ();
820
814
821
815
if (request.fHelp || (
822
- strMode != " activeseconds " && strMode != " addr" && strMode != " daemon " && strMode != " full" && strMode != " info" && strMode != " json" &&
823
- strMode != " lastseen " && strMode != " lastpaidtime" && strMode != " lastpaidblock" &&
824
- strMode != " protocol " && strMode != " payee" && strMode != " pubkey" &&
825
- strMode != " rank" && strMode != " sentinel " && strMode != " status" ))
816
+ strMode != " addr" && strMode != " full" && strMode != " info" && strMode != " json" &&
817
+ strMode != " lastpaidtime" && strMode != " lastpaidblock" &&
818
+ strMode != " payee" && strMode != " pubkey" &&
819
+ strMode != " rank" && strMode != " status" ))
826
820
{
827
821
masternode_list_help ();
828
822
}
@@ -867,32 +861,16 @@ UniValue masternodelist(const JSONRPCRequest& request)
867
861
payeeStr = CBitcoinAddress (payeeDest).ToString ();
868
862
}
869
863
870
- if (strMode == " activeseconds" ) {
871
- if (strFilter !=" " && strOutpoint.find (strFilter) == std::string::npos) continue ;
872
- obj.push_back (Pair (strOutpoint, (int64_t )(mn.lastPing .sigTime - mn.sigTime )));
873
- } else if (strMode == " addr" ) {
864
+ if (strMode == " addr" ) {
874
865
std::string strAddress = mn.addr .ToString ();
875
866
if (strFilter !=" " && strAddress.find (strFilter) == std::string::npos &&
876
867
strOutpoint.find (strFilter) == std::string::npos) continue ;
877
868
obj.push_back (Pair (strOutpoint, strAddress));
878
- } else if (strMode == " daemon" ) {
879
- std::string strDaemon = mn.lastPing .GetDaemonString ();
880
- if (strFilter !=" " && strDaemon.find (strFilter) == std::string::npos &&
881
- strOutpoint.find (strFilter) == std::string::npos) continue ;
882
- obj.push_back (Pair (strOutpoint, strDaemon));
883
- } else if (strMode == " sentinel" ) {
884
- std::string strSentinel = mn.lastPing .GetSentinelString ();
885
- if (strFilter !=" " && strSentinel.find (strFilter) == std::string::npos &&
886
- strOutpoint.find (strFilter) == std::string::npos) continue ;
887
- obj.push_back (Pair (strOutpoint, strSentinel));
888
869
} else if (strMode == " full" ) {
889
870
std::ostringstream streamFull;
890
871
streamFull << std::setw (18 ) <<
891
872
mn.GetStatus () << " " <<
892
- mn.nProtocolVersion << " " <<
893
873
payeeStr << " " <<
894
- (int64_t )mn.lastPing .sigTime << " " << std::setw (8 ) <<
895
- (int64_t )(mn.lastPing .sigTime - mn.sigTime ) << " " << std::setw (10 ) <<
896
874
mn.GetLastPaidTime () << " " << std::setw (6 ) <<
897
875
mn.GetLastPaidBlock () << " " <<
898
876
mn.addr .ToString ();
@@ -904,12 +882,7 @@ UniValue masternodelist(const JSONRPCRequest& request)
904
882
std::ostringstream streamInfo;
905
883
streamInfo << std::setw (18 ) <<
906
884
mn.GetStatus () << " " <<
907
- mn.nProtocolVersion << " " <<
908
885
payeeStr << " " <<
909
- (int64_t )mn.lastPing .sigTime << " " << std::setw (8 ) <<
910
- (int64_t )(mn.lastPing .sigTime - mn.sigTime ) << " " <<
911
- mn.lastPing .GetSentinelString () << " " <<
912
- (mn.lastPing .fSentinelIsCurrent ? " current" : " expired" ) << " " <<
913
886
mn.addr .ToString ();
914
887
std::string strInfo = streamInfo.str ();
915
888
if (strFilter !=" " && strInfo.find (strFilter) == std::string::npos &&
@@ -920,12 +893,6 @@ UniValue masternodelist(const JSONRPCRequest& request)
920
893
streamInfo << mn.addr .ToString () << " " <<
921
894
CBitcoinAddress (mn.pubKeyCollateralAddress .GetID ()).ToString () << " " <<
922
895
mn.GetStatus () << " " <<
923
- mn.nProtocolVersion << " " <<
924
- mn.lastPing .nDaemonVersion << " " <<
925
- mn.lastPing .GetSentinelString () << " " <<
926
- (mn.lastPing .fSentinelIsCurrent ? " current" : " expired" ) << " " <<
927
- (int64_t )mn.lastPing .sigTime << " " <<
928
- (int64_t )(mn.lastPing .sigTime - mn.sigTime ) << " " <<
929
896
mn.GetLastPaidTime () << " " <<
930
897
mn.GetLastPaidBlock ();
931
898
std::string strInfo = streamInfo.str ();
@@ -935,12 +902,6 @@ UniValue masternodelist(const JSONRPCRequest& request)
935
902
objMN.push_back (Pair (" address" , mn.addr .ToString ()));
936
903
objMN.push_back (Pair (" payee" , CBitcoinAddress (mn.pubKeyCollateralAddress .GetID ()).ToString ()));
937
904
objMN.push_back (Pair (" status" , mn.GetStatus ()));
938
- objMN.push_back (Pair (" protocol" , mn.nProtocolVersion ));
939
- objMN.push_back (Pair (" daemonversion" , mn.lastPing .GetDaemonString ()));
940
- objMN.push_back (Pair (" sentinelversion" , mn.lastPing .GetSentinelString ()));
941
- objMN.push_back (Pair (" sentinelstate" , (mn.lastPing .fSentinelIsCurrent ? " current" : " expired" )));
942
- objMN.push_back (Pair (" lastseen" , (int64_t )mn.lastPing .sigTime ));
943
- objMN.push_back (Pair (" activeseconds" , (int64_t )(mn.lastPing .sigTime - mn.sigTime )));
944
905
objMN.push_back (Pair (" lastpaidtime" , mn.GetLastPaidTime ()));
945
906
objMN.push_back (Pair (" lastpaidblock" , mn.GetLastPaidBlock ()));
946
907
obj.push_back (Pair (strOutpoint, objMN));
@@ -950,17 +911,10 @@ UniValue masternodelist(const JSONRPCRequest& request)
950
911
} else if (strMode == " lastpaidtime" ) {
951
912
if (strFilter !=" " && strOutpoint.find (strFilter) == std::string::npos) continue ;
952
913
obj.push_back (Pair (strOutpoint, mn.GetLastPaidTime ()));
953
- } else if (strMode == " lastseen" ) {
954
- if (strFilter !=" " && strOutpoint.find (strFilter) == std::string::npos) continue ;
955
- obj.push_back (Pair (strOutpoint, (int64_t )mn.lastPing .sigTime ));
956
914
} else if (strMode == " payee" ) {
957
915
if (strFilter !=" " && payeeStr.find (strFilter) == std::string::npos &&
958
916
strOutpoint.find (strFilter) == std::string::npos) continue ;
959
917
obj.push_back (Pair (strOutpoint, payeeStr));
960
- } else if (strMode == " protocol" ) {
961
- if (strFilter !=" " && strFilter != strprintf (" %d" , mn.nProtocolVersion ) &&
962
- strOutpoint.find (strFilter) == std::string::npos) continue ;
963
- obj.push_back (Pair (strOutpoint, mn.nProtocolVersion ));
964
918
} else if (strMode == " keyIDOwner" ) {
965
919
if (strFilter !=" " && strOutpoint.find (strFilter) == std::string::npos) continue ;
966
920
obj.push_back (Pair (strOutpoint, HexStr (mn.keyIDOwner )));
0 commit comments