Commit 24432866 authored by vipwzw's avatar vipwzw

fix linter

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