@@ -772,43 +772,8 @@ UniValue submitblock(const JSONRPCRequest& request)
772772
773773UniValue estimatefee (const JSONRPCRequest& request)
774774{
775- if (request.fHelp || request.params .size () != 1 )
776- throw std::runtime_error (
777- " estimatefee nblocks\n "
778- " \n DEPRECATED. Please use estimatesmartfee for more intelligent estimates."
779- " \n Estimates the approximate fee per kilobyte needed for a transaction to begin\n "
780- " confirmation within nblocks blocks. Uses virtual transaction size of transaction\n "
781- " as defined in BIP 141 (witness data is discounted).\n "
782- " \n Arguments:\n "
783- " 1. nblocks (numeric, required)\n "
784- " \n Result:\n "
785- " n (numeric) estimated fee-per-kilobyte\n "
786- " \n "
787- " A negative value is returned if not enough transactions and blocks\n "
788- " have been observed to make an estimate.\n "
789- " -1 is always returned for nblocks == 1 as it is impossible to calculate\n "
790- " a fee that is high enough to get reliably included in the next block.\n "
791- " \n Example:\n "
792- + HelpExampleCli (" estimatefee" , " 6" )
793- );
794-
795- if (!IsDeprecatedRPCEnabled (" estimatefee" )) {
796- throw JSONRPCError (RPC_METHOD_DEPRECATED, " estimatefee is deprecated and will be fully removed in v0.17. "
797- " To use estimatefee in v0.16, restart bitcoind with -deprecatedrpc=estimatefee.\n "
798- " Projects should transition to using estimatesmartfee before upgrading to v0.17" );
799- }
800-
801- RPCTypeCheck (request.params , {UniValue::VNUM});
802-
803- int nBlocks = request.params [0 ].get_int ();
804- if (nBlocks < 1 )
805- nBlocks = 1 ;
806-
807- CFeeRate feeRate = ::feeEstimator.estimateFee (nBlocks);
808- if (feeRate == CFeeRate (0 ))
809- return -1.0 ;
810-
811- return ValueFromAmount (feeRate.GetFeePerK ());
775+ throw JSONRPCError (RPC_METHOD_DEPRECATED, " estimatefee was removed in v0.17.\n "
776+ " Clients should use estimatesmartfee." );
812777}
813778
814779UniValue estimatesmartfee (const JSONRPCRequest& request)
@@ -986,7 +951,7 @@ static const CRPCCommand commands[] =
986951
987952 { " generating" , " generatetoaddress" , &generatetoaddress, {" nblocks" ," address" ," maxtries" } },
988953
989- { " util " , " estimatefee" , &estimatefee, {" nblocks " } },
954+ { " hidden " , " estimatefee" , &estimatefee, {} },
990955 { " util" , " estimatesmartfee" , &estimatesmartfee, {" conf_target" , " estimate_mode" } },
991956
992957 { " hidden" , " estimaterawfee" , &estimaterawfee, {" conf_target" , " threshold" } },
0 commit comments