From 47ab0296d6ca68aab23e4824120dbac3f9541729 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 31 Oct 2018 02:48:42 -1100 Subject: [PATCH] Oraclesregister, allow using floating point for < 1.0 data fee --- src/wallet/rpcwallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6469b3e43..c7a11fe1a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5715,7 +5715,8 @@ UniValue oraclesregister(const UniValue& params, bool fHelp) const CKeyStore& keystore = *pwalletMain; LOCK2(cs_main, pwalletMain->cs_wallet); txid = Parseuint256((char *)params[0].get_str().c_str()); - datafee = atol((char *)params[1].get_str().c_str()); + if ( (datafee= atol((char *)params[1].get_str().c_str())) == 0 ) + datafee = atof((char *)params[1].get_str().c_str()) * COIN; hex = OracleRegister(0,txid,datafee); if ( hex.size() > 0 ) {