Skip to content

Commit

Permalink
rename callchain (#68)
Browse files Browse the repository at this point in the history
Co-authored-by: xinran chen <[email protected]>
  • Loading branch information
Lawliet-Chan and xinran chen committed Jul 2, 2023
1 parent af90f1f commit 8226689
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions example/client/asset/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func QueryAccount(pubkey PubKey) {
BlockHash: Hash{},
Params: string(paramByt),
}
resp := CallChainByQry(Websocket, qcall)
resp := CallChainByReading(Websocket, qcall)
respMap := make(context.H)
err = json.Unmarshal(resp, &respMap)
if err != nil {
Expand Down Expand Up @@ -56,7 +56,7 @@ func CreateAccount(reqType int, privkey PrivKey, pubkey PubKey, amount uint64) {
Params: string(paramsByt),
LeiPrice: 0,
}
CallChainByExec(reqType, privkey, pubkey, wrCall)
CallChainByWriting(reqType, privkey, pubkey, wrCall)
}

type TransferInfo struct {
Expand All @@ -79,5 +79,5 @@ func TransferBalance(reqType int, privkey PrivKey, pubkey PubKey, to Address, am
Params: string(paramsByt),
LeiPrice: leiPrice,
}
CallChainByExec(reqType, privkey, pubkey, wrCall)
CallChainByWriting(reqType, privkey, pubkey, wrCall)
}
4 changes: 2 additions & 2 deletions example/client/callchain/callchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const (
Websocket
)

func CallChainByQry(reqtyp int, qcall *Rdcall) []byte {
func CallChainByReading(reqtyp int, qcall *Rdcall) []byte {
u := url.URL{Scheme: "ws", Host: "localhost:8999", Path: RdApiPath}
q := u.Query()
q.Set(TripodNameKey, qcall.TripodName)
Expand Down Expand Up @@ -61,7 +61,7 @@ func CallChainByQry(reqtyp int, qcall *Rdcall) []byte {
return nil
}

func CallChainByExec(reqType int, privkey PrivKey, pubkey PubKey, ecall *WrCall) {
func CallChainByWriting(reqType int, privkey PrivKey, pubkey PubKey, ecall *WrCall) {
hash, err := ecall.Hash()
if err != nil {
panic("ecall hash error: " + err.Error())
Expand Down

0 comments on commit 8226689

Please sign in to comment.