Skip to content

Commit

Permalink
handler prints
Browse files Browse the repository at this point in the history
  • Loading branch information
avendauz committed Aug 9, 2021
1 parent 6a91e18 commit 2a97a8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions x/curium/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ func DoBroadcast(resp chan *MsgBroadcasterResponse, keyringDir string, cdc *code
return
}



fmt.Println(msgs)
fmt.Println("Seq num before", state.seqNum)
state, err = updateAccountState(accnt, state)
fmt.Println("Seq num after", state.seqNum)


if err != nil {
returnError(err)
Expand Down Expand Up @@ -260,7 +262,7 @@ func DoBroadcast(resp chan *MsgBroadcasterResponse, keyringDir string, cdc *code
rpcCtx := rpctypes.Context{}

broadcastResult, err := core.BroadcastTxSync(&rpcCtx, signedMsgs)

fmt.Println(broadcastResult.Log)
if err != nil {
returnError(err)
return
Expand All @@ -275,6 +277,7 @@ func DoBroadcast(resp chan *MsgBroadcasterResponse, keyringDir string, cdc *code


if state.reset {
fmt.Println("Extended beyond retry limit")
returnError(errors.New(broadcastResult.Log))
return
}
Expand All @@ -298,6 +301,8 @@ func DoBroadcast(resp chan *MsgBroadcasterResponse, keyringDir string, cdc *code
return
}

fmt.Println(result.TxResult)

resp <- &MsgBroadcasterResponse{
Response: &result.TxResult,
Data: &result.TxResult.Data,
Expand Down
2 changes: 2 additions & 0 deletions x/nft/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func handleMsgPublishFile(ctx sdk.Context, k Keeper, msg *types.MsgPublishFile)
bencode.DecodeBytes(msg.Metainfo, &metainfo)
k.BtClient.RetrieveFile(&metainfo)
k.EnsureNftDirExists()
fmt.Println("Creating symlink")
err := os.Symlink(k.HomeDir+"/nft/"+msg.Hash, k.HomeDir+"/nft/"+msg.Vendor + "-" + msg.Id)

if err != nil {
Expand All @@ -103,6 +104,7 @@ func handleMsgPublishFile(ctx sdk.Context, k Keeper, msg *types.MsgPublishFile)
if err != nil {
return nil, err
}
fmt.Println("Writing id symlink")
err = os.Symlink(k.HomeDir+"/nft/"+msg.Hash+".info", k.HomeDir+"/nft/"+msg.Vendor + "-" + msg.Id+".info")
if err != nil {
return nil, err
Expand Down

0 comments on commit 2a97a8c

Please sign in to comment.