diff --git a/src/supernode/baseclientproxy.cpp b/src/supernode/baseclientproxy.cpp index 510a51240..4a87dc5f8 100644 --- a/src/supernode/baseclientproxy.cpp +++ b/src/supernode/baseclientproxy.cpp @@ -172,6 +172,12 @@ bool supernode::BaseClientProxy::RestoreAccount(const supernode::rpc_command::RE return true; } +bool supernode::BaseClientProxy::Transfer(const supernode::rpc_command::TRANSFER::request &in, supernode::rpc_command::TRANSFER::response &out) +{ + out.Result = ERROR_NOT_ENOUGH_COINS; + return true; +} + std::unique_ptr supernode::BaseClientProxy::initWallet(const string &account, const string &password) const { std::unique_ptr wal; diff --git a/src/supernode/baseclientproxy.h b/src/supernode/baseclientproxy.h index a2dcb1acb..c2157e962 100644 --- a/src/supernode/baseclientproxy.h +++ b/src/supernode/baseclientproxy.h @@ -53,6 +53,7 @@ class BaseClientProxy : public BaseRTAProcessor bool GetSeed(const rpc_command::GET_SEED::request &in, rpc_command::GET_SEED::response &out); bool RestoreAccount(const rpc_command::RESTORE_ACCOUNT::request &in, rpc_command::RESTORE_ACCOUNT::response &out); + bool Transfer(const rpc_command::TRANSFER::request &in, rpc_command::TRANSFER::response &out); protected: diff --git a/src/supernode/graft_defines.h b/src/supernode/graft_defines.h index 28b5f7d5d..92b757f1e 100644 --- a/src/supernode/graft_defines.h +++ b/src/supernode/graft_defines.h @@ -53,5 +53,7 @@ #define ERROR_BALANCE_NOT_AVAILABLE -16 #define ERROR_CANNOT_REJECT_PAY -17 +#define ERROR_NOT_ENOUGH_COINS -20 + #endif // GRAFT_DEFINES_H diff --git a/src/supernode/supernode_rpc_command.h b/src/supernode/supernode_rpc_command.h index 9260b9911..bbd42a06f 100644 --- a/src/supernode/supernode_rpc_command.h +++ b/src/supernode/supernode_rpc_command.h @@ -460,6 +460,29 @@ namespace supernode { }; }; + struct TRANSFER { + struct request { + std::string Account; + std::string Password; + std::string Address; + std::string Amount; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(Account) + KV_SERIALIZE(Password) + KV_SERIALIZE(Address) + KV_SERIALIZE(Amount) + END_KV_SERIALIZE_MAP() + }; + struct response { + int64_t Result; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(Result) + END_KV_SERIALIZE_MAP() + }; + }; + void ConvertFromTR(RTA_TransactionRecordRequest& dst, const RTA_TransactionRecord& src); void ConvertToTR(RTA_TransactionRecord& dst, const RTA_TransactionRecordRequest& src, const FSN_ServantBase* servant);