Commit 24432866 authored by vipwzw's avatar vipwzw

fix linter

parent e8a09f64
...@@ -81,7 +81,7 @@ func blackwhiteCreate(cmd *cobra.Command, args []string) { ...@@ -81,7 +81,7 @@ func blackwhiteCreate(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "blackwhite.BlackwhiteCreateTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "blackwhite.BlackwhiteCreateTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -141,7 +141,7 @@ func blackwhitePlay(cmd *cobra.Command, args []string) { ...@@ -141,7 +141,7 @@ func blackwhitePlay(cmd *cobra.Command, args []string) {
Fee: feeInt64, Fee: feeInt64,
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "blackwhite.BlackwhitePlayTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "blackwhite.BlackwhitePlayTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -180,7 +180,7 @@ func blackwhiteShow(cmd *cobra.Command, args []string) { ...@@ -180,7 +180,7 @@ func blackwhiteShow(cmd *cobra.Command, args []string) {
Fee: feeInt64, Fee: feeInt64,
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "blackwhite.BlackwhiteShowTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "blackwhite.BlackwhiteShowTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -213,7 +213,7 @@ func blackwhiteTimeoutDone(cmd *cobra.Command, args []string) { ...@@ -213,7 +213,7 @@ func blackwhiteTimeoutDone(cmd *cobra.Command, args []string) {
Fee: feeInt64, Fee: feeInt64,
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "blackwhite.BlackwhiteTimeoutDoneTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "blackwhite.BlackwhiteTimeoutDoneTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -290,6 +290,6 @@ func showBlackwhiteInfo(cmd *cobra.Command, args []string) { ...@@ -290,6 +290,6 @@ func showBlackwhiteInfo(cmd *cobra.Command, args []string) {
rep = &gt.ReplyLoopResults{} rep = &gt.ReplyLoopResults{}
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, rep) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, rep)
ctx.Run() ctx.Run()
} }
...@@ -97,7 +97,7 @@ func (c *Cert) loadHistoryByPrefix() error { ...@@ -97,7 +97,7 @@ func (c *Cert) loadHistoryByPrefix() error {
Direction: 0, Direction: 0,
Count: 0, Count: 0,
} }
result, err := c.DriverBase.GetApi().LocalList(parm) result, err := c.DriverBase.GetAPI().LocalList(parm)
if err != nil { if err != nil {
return err return err
} }
...@@ -126,7 +126,7 @@ func (c *Cert) loadHistoryByPrefix() error { ...@@ -126,7 +126,7 @@ func (c *Cert) loadHistoryByPrefix() error {
func (c *Cert) loadHistoryByHeight() error { func (c *Cert) loadHistoryByHeight() error {
key := calcCertHeightKey(c.GetHeight()) key := calcCertHeightKey(c.GetHeight())
parm := &types.LocalDBGet{Keys: [][]byte{key}} parm := &types.LocalDBGet{Keys: [][]byte{key}}
result, err := c.DriverBase.GetApi().LocalGet(parm) result, err := c.DriverBase.GetAPI().LocalGet(parm)
if err != nil { if err != nil {
return err return err
} }
......
...@@ -157,7 +157,7 @@ func evmBalance(cmd *cobra.Command, args []string) { ...@@ -157,7 +157,7 @@ func evmBalance(cmd *cobra.Command, args []string) {
StateHash: "", StateHash: "",
} }
var res []*rpctypes.Account var res []*rpctypes.Account
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.GetBalance", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.GetBalance", params, &res)
ctx.SetResultCb(parseGetBalanceRes) ctx.SetResultCb(parseGetBalanceRes)
ctx.Run() ctx.Run()
} }
...@@ -234,7 +234,7 @@ func createContract(cmd *cobra.Command, args []string) { ...@@ -234,7 +234,7 @@ func createContract(cmd *cobra.Command, args []string) {
Data: data, Data: data,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.SendTransaction", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.SendTransaction", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -369,7 +369,7 @@ func callContract(cmd *cobra.Command, args []string) { ...@@ -369,7 +369,7 @@ func callContract(cmd *cobra.Command, args []string) {
Data: data, Data: data,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.SendTransaction", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.SendTransaction", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -594,7 +594,7 @@ func evmTransfer(cmd *cobra.Command, args []string) { ...@@ -594,7 +594,7 @@ func evmTransfer(cmd *cobra.Command, args []string) {
Data: data, Data: data,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.SendTransaction", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.SendTransaction", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -642,7 +642,7 @@ func evmWithdraw(cmd *cobra.Command, args []string) { ...@@ -642,7 +642,7 @@ func evmWithdraw(cmd *cobra.Command, args []string) {
Data: data, Data: data,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.SendTransaction", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.SendTransaction", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
......
...@@ -150,7 +150,7 @@ func (evm *EVMExecutor) NewEVMContext(msg *common.Message) runtime.Context { ...@@ -150,7 +150,7 @@ func (evm *EVMExecutor) NewEVMContext(msg *common.Message) runtime.Context {
return runtime.Context{ return runtime.Context{
CanTransfer: CanTransfer, CanTransfer: CanTransfer,
Transfer: Transfer, Transfer: Transfer,
GetHash: GetHashFn(evm.GetApi()), GetHash: GetHashFn(evm.GetAPI()),
Origin: msg.From(), Origin: msg.From(),
Coinbase: nil, Coinbase: nil,
BlockNumber: new(big.Int).SetInt64(evm.GetHeight()), BlockNumber: new(big.Int).SetInt64(evm.GetHeight()),
......
...@@ -93,7 +93,7 @@ func hashlockLockCmd(cmd *cobra.Command, args []string) { ...@@ -93,7 +93,7 @@ func hashlockLockCmd(cmd *cobra.Command, args []string) {
ActionName: "HashlockLock", ActionName: "HashlockLock",
Payload: payLoad, Payload: payLoad,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.CreateTransaction", paramWithExecAction, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.CreateTransaction", paramWithExecAction, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -136,7 +136,7 @@ func hashlockUnlockCmd(cmd *cobra.Command, args []string) { ...@@ -136,7 +136,7 @@ func hashlockUnlockCmd(cmd *cobra.Command, args []string) {
ActionName: "HashlockUnlock", ActionName: "HashlockUnlock",
Payload: payLoad, Payload: payLoad,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.CreateTransaction", paramWithExecAction, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.CreateTransaction", paramWithExecAction, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -171,6 +171,6 @@ func hashlockSendCmd(cmd *cobra.Command, args []string) { ...@@ -171,6 +171,6 @@ func hashlockSendCmd(cmd *cobra.Command, args []string) {
ActionName: "HashlockSend", ActionName: "HashlockSend",
Payload: payLoad, Payload: payLoad,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.CreateTransaction", paramWithExecAction, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.CreateTransaction", paramWithExecAction, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -136,7 +136,7 @@ func NewLotteryAction(l *Lottery, tx *types.Transaction, index int) *Action { ...@@ -136,7 +136,7 @@ func NewLotteryAction(l *Lottery, tx *types.Transaction, index int) *Action {
grpcClient := types.NewChain33Client(conn) grpcClient := types.NewChain33Client(conn)
return &Action{l.GetCoinsAccount(), l.GetStateDB(), hash, fromaddr, l.GetBlockTime(), return &Action{l.GetCoinsAccount(), l.GetStateDB(), hash, fromaddr, l.GetBlockTime(),
l.GetHeight(), dapp.ExecAddress(string(tx.Execer)), l.GetDifficulty(), l.GetApi(), conn, grpcClient, index} l.GetHeight(), dapp.ExecAddress(string(tx.Execer)), l.GetDifficulty(), l.GetAPI(), conn, grpcClient, index}
} }
// GetReceiptLog generate logs for all lottery action // GetReceiptLog generate logs for all lottery action
......
...@@ -36,7 +36,7 @@ func newAction(t *Paracross, tx *types.Transaction) *action { ...@@ -36,7 +36,7 @@ func newAction(t *Paracross, tx *types.Transaction) *action {
hash := tx.Hash() hash := tx.Hash()
fromaddr := tx.From() fromaddr := tx.From()
return &action{t.GetCoinsAccount(), t.GetStateDB(), t.GetLocalDB(), hash, fromaddr, return &action{t.GetCoinsAccount(), t.GetStateDB(), t.GetLocalDB(), hash, fromaddr,
t.GetBlockTime(), t.GetHeight(), dapp.ExecAddress(string(tx.Execer)), t.GetApi(), tx, t} t.GetBlockTime(), t.GetHeight(), dapp.ExecAddress(string(tx.Execer)), t.GetAPI(), tx, t}
} }
func getNodes(db dbm.KV, title string) (map[string]struct{}, error) { func getNodes(db dbm.KV, title string) (map[string]struct{}, error) {
......
...@@ -55,7 +55,7 @@ func (suite *AssetTransferTestSuite) SetupTest() { ...@@ -55,7 +55,7 @@ func (suite *AssetTransferTestSuite) SetupTest() {
suite.exec.SetLocalDB(suite.localDB) suite.exec.SetLocalDB(suite.localDB)
suite.exec.SetStateDB(suite.stateDB) suite.exec.SetStateDB(suite.stateDB)
suite.exec.SetEnv(0, 0, 0) suite.exec.SetEnv(0, 0, 0)
suite.exec.SetApi(suite.api) suite.exec.SetAPI(suite.api)
enableParacrossTransfer = true enableParacrossTransfer = true
// setup block // setup block
......
...@@ -50,7 +50,7 @@ func (suite *AssetWithdrawTestSuite) SetupTest() { ...@@ -50,7 +50,7 @@ func (suite *AssetWithdrawTestSuite) SetupTest() {
suite.exec.SetLocalDB(suite.localDB) suite.exec.SetLocalDB(suite.localDB)
suite.exec.SetStateDB(suite.stateDB) suite.exec.SetStateDB(suite.stateDB)
suite.exec.SetEnv(0, 0, 0) suite.exec.SetEnv(0, 0, 0)
suite.exec.SetApi(suite.api) suite.exec.SetAPI(suite.api)
enableParacrossTransfer = true enableParacrossTransfer = true
// setup block // setup block
......
...@@ -113,7 +113,7 @@ func (c *Paracross) saveLocalParaTxs(tx *types.Transaction, isDel bool) (*types. ...@@ -113,7 +113,7 @@ func (c *Paracross) saveLocalParaTxs(tx *types.Transaction, isDel bool) (*types.
for i := 0; i < len(commit.Status.CrossTxHashs); i++ { for i := 0; i < len(commit.Status.CrossTxHashs); i++ {
success := util.BitMapBit(commit.Status.CrossTxResult, uint32(i)) success := util.BitMapBit(commit.Status.CrossTxResult, uint32(i))
paraTx, err := GetTx(c.GetApi(), commit.Status.CrossTxHashs[i]) paraTx, err := GetTx(c.GetAPI(), commit.Status.CrossTxHashs[i])
if err != nil { if err != nil {
clog.Crit("paracross.Commit Load Tx failed", "para title", commit.Status.Title, clog.Crit("paracross.Commit Load Tx failed", "para title", commit.Status.Title,
"para height", commit.Status.Height, "para tx index", i, "error", err, "txHash", "para height", commit.Status.Height, "para tx index", i, "error", err, "txHash",
......
...@@ -103,7 +103,7 @@ func (suite *CommitTestSuite) SetupSuite() { ...@@ -103,7 +103,7 @@ func (suite *CommitTestSuite) SetupSuite() {
suite.exec.SetLocalDB(suite.localDB) suite.exec.SetLocalDB(suite.localDB)
suite.exec.SetStateDB(suite.stateDB) suite.exec.SetStateDB(suite.stateDB)
suite.exec.SetEnv(0, 0, 0) suite.exec.SetEnv(0, 0, 0)
suite.exec.SetApi(suite.api) suite.exec.SetAPI(suite.api)
enableParacrossTransfer = false enableParacrossTransfer = false
// TODO, more fields // TODO, more fields
...@@ -355,7 +355,7 @@ func TestCrossLimits(t *testing.T) { ...@@ -355,7 +355,7 @@ func TestCrossLimits(t *testing.T) {
exec.SetLocalDB(localDB) exec.SetLocalDB(localDB)
exec.SetStateDB(stateDB) exec.SetStateDB(stateDB)
exec.SetEnv(0, 0, 0) exec.SetEnv(0, 0, 0)
exec.SetApi(api) exec.SetAPI(api)
tx := &types.Transaction{Execer: []byte("p.user.test.paracross")} tx := &types.Transaction{Execer: []byte("p.user.test.paracross")}
......
...@@ -67,7 +67,7 @@ func pokerbullStart(cmd *cobra.Command, args []string) { ...@@ -67,7 +67,7 @@ func pokerbullStart(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "pokerbull.PokerBullStartTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "pokerbull.PokerBullStartTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -100,7 +100,7 @@ func pokerbullContinue(cmd *cobra.Command, args []string) { ...@@ -100,7 +100,7 @@ func pokerbullContinue(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "pokerbull.PokerBullContinueTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "pokerbull.PokerBullContinueTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -133,7 +133,7 @@ func pokerbullQuit(cmd *cobra.Command, args []string) { ...@@ -133,7 +133,7 @@ func pokerbullQuit(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "pokerbull.PokerBullQuitTx", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "pokerbull.PokerBullQuitTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -178,17 +178,17 @@ func pokerbullQuery(cmd *cobra.Command, args []string) { ...@@ -178,17 +178,17 @@ func pokerbullQuery(cmd *cobra.Command, args []string) {
if gameID != "" { if gameID != "" {
params.FuncName = pkt.FuncNameQueryGameByID params.FuncName = pkt.FuncNameQueryGameByID
var res pkt.ReplyPBGame var res pkt.ReplyPBGame
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run() ctx.Run()
} else if address != "" { } else if address != "" {
params.FuncName = pkt.FuncNameQueryGameByAddr params.FuncName = pkt.FuncNameQueryGameByAddr
var res pkt.PBGameRecords var res pkt.PBGameRecords
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run() ctx.Run()
} else if statusStr != "" { } else if statusStr != "" {
params.FuncName = pkt.FuncNameQueryGameByStatus params.FuncName = pkt.FuncNameQueryGameByStatus
var res pkt.PBGameRecords var res pkt.PBGameRecords
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run() ctx.Run()
} else if gameIDs != "" { } else if gameIDs != "" {
params.FuncName = pkt.FuncNameQueryGameListByIDs params.FuncName = pkt.FuncNameQueryGameListByIDs
...@@ -198,7 +198,7 @@ func pokerbullQuery(cmd *cobra.Command, args []string) { ...@@ -198,7 +198,7 @@ func pokerbullQuery(cmd *cobra.Command, args []string) {
req := &pkt.QueryPBGameInfos{GameIds: gameIDsS} req := &pkt.QueryPBGameInfos{GameIds: gameIDsS}
params.Payload = req params.Payload = req
var res pkt.ReplyPBGameList var res pkt.ReplyPBGameList
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run() ctx.Run()
} else { } else {
fmt.Println("Error: requeres at least one of gameID, address or status") fmt.Println("Error: requeres at least one of gameID, address or status")
......
...@@ -74,7 +74,7 @@ func showPrivacyKey(cmd *cobra.Command, args []string) { ...@@ -74,7 +74,7 @@ func showPrivacyKey(cmd *cobra.Command, args []string) {
Data: addr, Data: addr,
} }
var res pty.ReplyPrivacyPkPair var res pty.ReplyPrivacyPkPair
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.ShowPrivacykey", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.ShowPrivacykey", params, &res)
ctx.Run() ctx.Run()
} }
...@@ -138,7 +138,7 @@ func public2Privacy(cmd *cobra.Command, args []string) { ...@@ -138,7 +138,7 @@ func public2Privacy(cmd *cobra.Command, args []string) {
} }
var res rpctypes.ReplyHash var res rpctypes.ReplyHash
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.MakeTxPublic2privacy", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.MakeTxPublic2privacy", params, &res)
ctx.Run() ctx.Run()
} }
...@@ -204,7 +204,7 @@ func privacy2Privacy(cmd *cobra.Command, args []string) { ...@@ -204,7 +204,7 @@ func privacy2Privacy(cmd *cobra.Command, args []string) {
} }
var res rpctypes.ReplyHash var res rpctypes.ReplyHash
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.MakeTxPrivacy2privacy", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.MakeTxPrivacy2privacy", params, &res)
ctx.Run() ctx.Run()
} }
...@@ -271,7 +271,7 @@ func privacy2Public(cmd *cobra.Command, args []string) { ...@@ -271,7 +271,7 @@ func privacy2Public(cmd *cobra.Command, args []string) {
} }
var res rpctypes.ReplyHash var res rpctypes.ReplyHash
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.MakeTxPrivacy2public", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.MakeTxPrivacy2public", params, &res)
ctx.Run() ctx.Run()
} }
...@@ -300,7 +300,7 @@ func showPrivacyAccountSpend(cmd *cobra.Command, args []string) { ...@@ -300,7 +300,7 @@ func showPrivacyAccountSpend(cmd *cobra.Command, args []string) {
} }
var res pty.UTXOHaveTxHashs var res pty.UTXOHaveTxHashs
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.ShowPrivacyAccountSpend", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.ShowPrivacyAccountSpend", params, &res)
ctx.SetResultCb(parseShowPrivacyAccountSpendRes) ctx.SetResultCb(parseShowPrivacyAccountSpendRes)
ctx.Run() ctx.Run()
} }
...@@ -370,7 +370,7 @@ func showAmountOfUTXO(cmd *cobra.Command, args []string) { ...@@ -370,7 +370,7 @@ func showAmountOfUTXO(cmd *cobra.Command, args []string) {
params.Payload = reqPrivacyToken params.Payload = reqPrivacyToken
var res pty.ReplyPrivacyAmounts var res pty.ReplyPrivacyAmounts
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseShowAmountOfUTXORes) ctx.SetResultCb(parseShowAmountOfUTXORes)
ctx.Run() ctx.Run()
} }
...@@ -413,7 +413,7 @@ func showUTXOs4SpecifiedAmount(cmd *cobra.Command, args []string) { ...@@ -413,7 +413,7 @@ func showUTXOs4SpecifiedAmount(cmd *cobra.Command, args []string) {
params.Payload = reqPrivacyToken params.Payload = reqPrivacyToken
var res pty.ReplyUTXOsOfAmount var res pty.ReplyUTXOsOfAmount
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseShowUTXOs4SpecifiedAmountRes) ctx.SetResultCb(parseShowUTXOs4SpecifiedAmountRes)
ctx.Run() ctx.Run()
} }
...@@ -479,7 +479,7 @@ func createUTXOs(cmd *cobra.Command, args []string) { ...@@ -479,7 +479,7 @@ func createUTXOs(cmd *cobra.Command, args []string) {
} }
var res rpctypes.ReplyHash var res rpctypes.ReplyHash
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.CreateUTXOs", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.CreateUTXOs", params, &res)
ctx.Run() ctx.Run()
} }
...@@ -519,7 +519,7 @@ func showPrivacyAccountInfo(cmd *cobra.Command, args []string) { ...@@ -519,7 +519,7 @@ func showPrivacyAccountInfo(cmd *cobra.Command, args []string) {
} }
var res pty.ReplyPrivacyAccount var res pty.ReplyPrivacyAccount
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.ShowPrivacyAccountInfo", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.ShowPrivacyAccountInfo", params, &res)
ctx.SetResultCb(parseshowPrivacyAccountInfo) ctx.SetResultCb(parseshowPrivacyAccountInfo)
ctx.Run() ctx.Run()
} }
...@@ -612,7 +612,7 @@ func listPrivacyTxsFlags(cmd *cobra.Command, args []string) { ...@@ -612,7 +612,7 @@ func listPrivacyTxsFlags(cmd *cobra.Command, args []string) {
Seedtxhash: []byte(seedtxhash), Seedtxhash: []byte(seedtxhash),
} }
var res rpctypes.WalletTxDetails var res rpctypes.WalletTxDetails
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.PrivacyTxList", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.PrivacyTxList", params, &res)
ctx.SetResultCb(parseWalletTxListRes) ctx.SetResultCb(parseWalletTxListRes)
ctx.Run() ctx.Run()
} }
...@@ -671,7 +671,7 @@ func rescanUtxosOpt(cmd *cobra.Command, args []string) { ...@@ -671,7 +671,7 @@ func rescanUtxosOpt(cmd *cobra.Command, args []string) {
} }
var res pty.RepRescanUtxos var res pty.RepRescanUtxos
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.RescanUtxos", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.RescanUtxos", params, &res)
ctx.SetResultCb(parseRescanUtxosOpt) ctx.SetResultCb(parseRescanUtxosOpt)
ctx.Run() ctx.Run()
} }
...@@ -726,7 +726,7 @@ func enablePrivacy(cmd *cobra.Command, args []string) { ...@@ -726,7 +726,7 @@ func enablePrivacy(cmd *cobra.Command, args []string) {
} }
var res pty.RepEnablePrivacy var res pty.RepEnablePrivacy
ctx := jsonclient.NewRpcCtx(rpcLaddr, "privacy.EnablePrivacy", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.EnablePrivacy", params, &res)
ctx.SetResultCb(parseEnablePrivacy) ctx.SetResultCb(parseEnablePrivacy)
ctx.Run() ctx.Run()
} }
......
...@@ -398,7 +398,7 @@ func relayOrder(cmd *cobra.Command, args []string) { ...@@ -398,7 +398,7 @@ func relayOrder(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonclient.NewRpcCtx(rpcLaddr, "relay.CreateRawRelayOrderTx", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "relay.CreateRawRelayOrderTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -441,7 +441,7 @@ func relayAccept(cmd *cobra.Command, args []string) { ...@@ -441,7 +441,7 @@ func relayAccept(cmd *cobra.Command, args []string) {
CoinWaits: coinwait, CoinWaits: coinwait,
} }
var res string var res string
ctx := jsonclient.NewRpcCtx(rpcLaddr, "relay.CreateRawRelayAcceptTx", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "relay.CreateRawRelayAcceptTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -481,7 +481,7 @@ func relayRevoke(cmd *cobra.Command, args []string) { ...@@ -481,7 +481,7 @@ func relayRevoke(cmd *cobra.Command, args []string) {
Action: act, Action: act,
} }
var res string var res string
ctx := jsonclient.NewRpcCtx(rpcLaddr, "relay.CreateRawRelayRevokeTx", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "relay.CreateRawRelayRevokeTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -516,7 +516,7 @@ func relayConfirm(cmd *cobra.Command, args []string) { ...@@ -516,7 +516,7 @@ func relayConfirm(cmd *cobra.Command, args []string) {
TxHash: txHash, TxHash: txHash,
} }
var res string var res string
ctx := jsonclient.NewRpcCtx(rpcLaddr, "relay.CreateRawRelayConfirmTx", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "relay.CreateRawRelayConfirmTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -566,7 +566,7 @@ func relaySaveBtcHead(cmd *cobra.Command, args []string) { ...@@ -566,7 +566,7 @@ func relaySaveBtcHead(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonclient.NewRpcCtx(rpcLaddr, "relay.CreateRawRelaySaveBTCHeadTx", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "relay.CreateRawRelaySaveBTCHeadTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -617,6 +617,6 @@ func relayVerifyBTC(cmd *cobra.Command, args []string) { ...@@ -617,6 +617,6 @@ func relayVerifyBTC(cmd *cobra.Command, args []string) {
} }
var res string var res string
ctx := jsonclient.NewRpcCtx(rpcLaddr, "relay.CreateRawRelayVerifyBTCTx", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "relay.CreateRawRelayVerifyBTCTx", params, &res)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -74,7 +74,7 @@ func (s *suiteRelay) SetupSuite() { ...@@ -74,7 +74,7 @@ func (s *suiteRelay) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
relay.SetExecutorType(types.LoadExecutorType(driverName)) relay.SetExecutorType(types.LoadExecutorType(driverName))
s.relay = relay s.relay = relay
...@@ -406,7 +406,7 @@ func (s *suiteBtcHeader) SetupSuite() { ...@@ -406,7 +406,7 @@ func (s *suiteBtcHeader) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
relay.SetExecutorType(types.LoadExecutorType(driverName)) relay.SetExecutorType(types.LoadExecutorType(driverName))
s.relay = relay s.relay = relay
......
...@@ -154,7 +154,7 @@ func (s *suiteRelayDB) SetupSuite() { ...@@ -154,7 +154,7 @@ func (s *suiteRelayDB) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
s.relay = relay s.relay = relay
...@@ -337,7 +337,7 @@ func (s *suiteAccept) SetupSuite() { ...@@ -337,7 +337,7 @@ func (s *suiteAccept) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
s.relay = relay s.relay = relay
...@@ -535,7 +535,7 @@ func (s *suiteConfirm) SetupSuite() { ...@@ -535,7 +535,7 @@ func (s *suiteConfirm) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
s.relay = relay s.relay = relay
...@@ -824,7 +824,7 @@ func (s *suiteVerify) SetupSuite() { ...@@ -824,7 +824,7 @@ func (s *suiteVerify) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
s.relay = relay s.relay = relay
...@@ -1055,7 +1055,7 @@ func (s *suiteVerifyCli) SetupSuite() { ...@@ -1055,7 +1055,7 @@ func (s *suiteVerifyCli) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
s.relay = relay s.relay = relay
...@@ -1130,7 +1130,7 @@ func (s *suiteSaveBtcHeader) SetupSuite() { ...@@ -1130,7 +1130,7 @@ func (s *suiteSaveBtcHeader) SetupSuite() {
relay.SetLocalDB(s.kvdb) relay.SetLocalDB(s.kvdb)
relay.SetEnv(10, 100, 1) relay.SetEnv(10, 100, 1)
relay.SetIsFree(false) relay.SetIsFree(false)
relay.SetApi(nil) relay.SetAPI(nil)
relay.SetChild(relay) relay.SetChild(relay)
s.relay = relay s.relay = relay
......
...@@ -81,7 +81,7 @@ func backupCmd(cmd *cobra.Command, args []string) { ...@@ -81,7 +81,7 @@ func backupCmd(cmd *cobra.Command, args []string) {
DelayPeriod: delay, DelayPeriod: delay,
Fee: feeInt64, Fee: feeInt64,
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "retrieve.CreateRawRetrieveBackupTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "retrieve.CreateRawRetrieveBackupTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -118,7 +118,7 @@ func prepareCmd(cmd *cobra.Command, args []string) { ...@@ -118,7 +118,7 @@ func prepareCmd(cmd *cobra.Command, args []string) {
DefaultAddr: defaultAddr, DefaultAddr: defaultAddr,
Fee: feeInt64, Fee: feeInt64,
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "retrieve.CreateRawRetrievePrepareTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "retrieve.CreateRawRetrievePrepareTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -145,7 +145,7 @@ func performCmd(cmd *cobra.Command, args []string) { ...@@ -145,7 +145,7 @@ func performCmd(cmd *cobra.Command, args []string) {
DefaultAddr: defaultAddr, DefaultAddr: defaultAddr,
Fee: feeInt64, Fee: feeInt64,
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "retrieve.CreateRawRetrievePerformTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "retrieve.CreateRawRetrievePerformTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -172,7 +172,7 @@ func cancelCmd(cmd *cobra.Command, args []string) { ...@@ -172,7 +172,7 @@ func cancelCmd(cmd *cobra.Command, args []string) {
DefaultAddr: defaultAddr, DefaultAddr: defaultAddr,
Fee: feeInt64, Fee: feeInt64,
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "retrieve.CreateRawRetrieveCancelTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "retrieve.CreateRawRetrieveCancelTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -232,7 +232,7 @@ func queryRetrieveCmd(cmd *cobra.Command, args []string) { ...@@ -232,7 +232,7 @@ func queryRetrieveCmd(cmd *cobra.Command, args []string) {
params.Payload = req params.Payload = req
var res rt.RetrieveQuery var res rt.RetrieveQuery
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseRerieveDetail) ctx.SetResultCb(parseRerieveDetail)
ctx.Run() ctx.Run()
} }
...@@ -91,7 +91,7 @@ func CountTicketCmd() *cobra.Command { ...@@ -91,7 +91,7 @@ func CountTicketCmd() *cobra.Command {
func countTicket(cmd *cobra.Command, args []string) { func countTicket(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
var res int64 var res int64
ctx := jsonclient.NewRpcCtx(rpcLaddr, "ticket.GetTicketCount", nil, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "ticket.GetTicketCount", nil, &res)
ctx.Run() ctx.Run()
} }
...@@ -188,6 +188,6 @@ func coldAddressOfMiner(cmd *cobra.Command, args []string) { ...@@ -188,6 +188,6 @@ func coldAddressOfMiner(cmd *cobra.Command, args []string) {
params.Payload = reqaddr params.Payload = reqaddr
var res types.ReplyStrings var res types.ReplyStrings
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run() ctx.Run()
} }
...@@ -255,7 +255,7 @@ func tokenAssets(cmd *cobra.Command, args []string) { ...@@ -255,7 +255,7 @@ func tokenAssets(cmd *cobra.Command, args []string) {
params.Payload = req params.Payload = req
var res tokenty.ReplyAccountTokenAssets var res tokenty.ReplyAccountTokenAssets
ctx := jsonclient.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseTokenAssetsRes) ctx.SetResultCb(parseTokenAssetsRes)
ctx.Run() ctx.Run()
} }
...@@ -314,7 +314,7 @@ func tokenBalance(cmd *cobra.Command, args []string) { ...@@ -314,7 +314,7 @@ func tokenBalance(cmd *cobra.Command, args []string) {
Execer: execer, Execer: execer,
} }
var res []*rpctypes.Account var res []*rpctypes.Account
ctx := jsonclient.NewRpcCtx(rpcLaddr, "token.GetTokenBalance", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.GetTokenBalance", params, &res)
ctx.SetResultCb(parseTokenBalanceRes) ctx.SetResultCb(parseTokenBalanceRes)
ctx.Run() ctx.Run()
} }
...@@ -388,7 +388,7 @@ func tokenPrecreated(cmd *cobra.Command, args []string) { ...@@ -388,7 +388,7 @@ func tokenPrecreated(cmd *cobra.Command, args []string) {
Owner: ownerAddr, Owner: ownerAddr,
Total: total * types.TokenPrecision, Total: total * types.TokenPrecision,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "token.CreateRawTokenPreCreateTx", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.CreateRawTokenPreCreateTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -422,7 +422,7 @@ func tokenFinish(cmd *cobra.Command, args []string) { ...@@ -422,7 +422,7 @@ func tokenFinish(cmd *cobra.Command, args []string) {
Owner: ownerAddr, Owner: ownerAddr,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "token.CreateRawTokenFinishTx", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.CreateRawTokenFinishTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -457,6 +457,6 @@ func tokenRevoke(cmd *cobra.Command, args []string) { ...@@ -457,6 +457,6 @@ func tokenRevoke(cmd *cobra.Command, args []string) {
Owner: ownerAddr, Owner: ownerAddr,
} }
ctx := jsonclient.NewRpcCtx(rpcLaddr, "token.CreateRawTokenRevokeTx", params, nil) ctx := jsonclient.NewRPCCtx(rpcLaddr, "token.CreateRawTokenRevokeTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -77,7 +77,7 @@ func showOnesSellOrders(cmd *cobra.Command, args []string) { ...@@ -77,7 +77,7 @@ func showOnesSellOrders(cmd *cobra.Command, args []string) {
Payload: reqAddrtokens, Payload: reqAddrtokens,
} }
var res pty.ReplySellOrders var res pty.ReplySellOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseSellOrders) ctx.SetResultCb(parseSellOrders)
ctx.Run() ctx.Run()
} }
...@@ -118,7 +118,7 @@ func showOnesSellOrdersStatus(cmd *cobra.Command, args []string) { ...@@ -118,7 +118,7 @@ func showOnesSellOrdersStatus(cmd *cobra.Command, args []string) {
params.FuncName = "GetOnesSellOrderWithStatus" params.FuncName = "GetOnesSellOrderWithStatus"
params.Payload = reqAddrtokens params.Payload = reqAddrtokens
var res pty.ReplySellOrders var res pty.ReplySellOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseSellOrders) ctx.SetResultCb(parseSellOrders)
ctx.Run() ctx.Run()
} }
...@@ -171,7 +171,7 @@ func showTokenSellOrdersStatus(cmd *cobra.Command, args []string) { ...@@ -171,7 +171,7 @@ func showTokenSellOrdersStatus(cmd *cobra.Command, args []string) {
params.FuncName = "GetTokenSellOrderByStatus" params.FuncName = "GetTokenSellOrderByStatus"
params.Payload = req params.Payload = req
var res pty.ReplySellOrders var res pty.ReplySellOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseSellOrders) ctx.SetResultCb(parseSellOrders)
ctx.Run() ctx.Run()
} }
...@@ -234,7 +234,7 @@ func showOnesBuyOrders(cmd *cobra.Command, args []string) { ...@@ -234,7 +234,7 @@ func showOnesBuyOrders(cmd *cobra.Command, args []string) {
params.FuncName = "GetOnesBuyOrder" params.FuncName = "GetOnesBuyOrder"
params.Payload = reqAddrtokens params.Payload = reqAddrtokens
var res pty.ReplyBuyOrders var res pty.ReplyBuyOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseBuyOrders) ctx.SetResultCb(parseBuyOrders)
ctx.Run() ctx.Run()
} }
...@@ -274,7 +274,7 @@ func showOnesBuyOrdersStatus(cmd *cobra.Command, args []string) { ...@@ -274,7 +274,7 @@ func showOnesBuyOrdersStatus(cmd *cobra.Command, args []string) {
params.FuncName = "GetOnesBuyOrderWithStatus" params.FuncName = "GetOnesBuyOrderWithStatus"
params.Payload = reqAddrtokens params.Payload = reqAddrtokens
var res pty.ReplyBuyOrders var res pty.ReplyBuyOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseBuyOrders) ctx.SetResultCb(parseBuyOrders)
ctx.Run() ctx.Run()
} }
...@@ -327,7 +327,7 @@ func showTokenBuyOrdersStatus(cmd *cobra.Command, args []string) { ...@@ -327,7 +327,7 @@ func showTokenBuyOrdersStatus(cmd *cobra.Command, args []string) {
params.FuncName = "GetTokenBuyOrderByStatus" params.FuncName = "GetTokenBuyOrderByStatus"
params.Payload = req params.Payload = req
var res pty.ReplyBuyOrders var res pty.ReplyBuyOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseBuyOrders) ctx.SetResultCb(parseBuyOrders)
ctx.Run() ctx.Run()
} }
...@@ -401,7 +401,7 @@ func showOnesOrdersStatus(cmd *cobra.Command, args []string) { ...@@ -401,7 +401,7 @@ func showOnesOrdersStatus(cmd *cobra.Command, args []string) {
params.FuncName = "GetOnesOrderWithStatus" params.FuncName = "GetOnesOrderWithStatus"
params.Payload = reqAddrtokens params.Payload = reqAddrtokens
var res pty.ReplyTradeOrders var res pty.ReplyTradeOrders
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.SetResultCb(parseTradeOrders) ctx.SetResultCb(parseTradeOrders)
ctx.Run() ctx.Run()
} }
...@@ -482,7 +482,7 @@ func tokenSell(cmd *cobra.Command, args []string) { ...@@ -482,7 +482,7 @@ func tokenSell(cmd *cobra.Command, args []string) {
AssetExec: "token", AssetExec: "token",
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "trade.CreateRawTradeSellTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "trade.CreateRawTradeSellTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -518,7 +518,7 @@ func tokenBuy(cmd *cobra.Command, args []string) { ...@@ -518,7 +518,7 @@ func tokenBuy(cmd *cobra.Command, args []string) {
Fee: feeInt64 * 1e4, Fee: feeInt64 * 1e4,
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "trade.CreateRawTradeBuyTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "trade.CreateRawTradeBuyTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
...@@ -551,6 +551,6 @@ func tokenSellRevoke(cmd *cobra.Command, args []string) { ...@@ -551,6 +551,6 @@ func tokenSellRevoke(cmd *cobra.Command, args []string) {
Fee: feeInt64 * 1e4, Fee: feeInt64 * 1e4,
} }
ctx := jsonrpc.NewRpcCtx(rpcLaddr, "trade.CreateRawTradeRevokeTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "trade.CreateRawTradeRevokeTx", params, nil)
ctx.RunWithoutMarshal() ctx.RunWithoutMarshal()
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment