Skip to content

Commit

Permalink
readded prints for seq error retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Aven Dauz authored and Aven Dauz committed Aug 7, 2021
1 parent 1d73dc1 commit b6c4153
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/curium/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func DoBroadcast(resp chan *MsgBroadcasterResponse, keyringDir string, cdc *code
rpcCtx := rpctypes.Context{}

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

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


if state.reset {
fmt.Println("Exceeded retry limit")
returnError(errors.New(broadcastResult.Log))
return
}
Expand Down
2 changes: 2 additions & 0 deletions x/nft/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func handleMsgCreateNft(goCtx sdk.Context, k keeper.Keeper, msg *types.MsgCreate
}

go func() {
fmt.Println("Calling BroadcastPublishFile")
err = k.BroadcastPublishFile(goCtx, msg.Id, msg.Vendor, msg.UserId, msg.Hash, msg.Mime, metainfo)
if err != nil {
k.Logger(goCtx).Error("error broadcasting publish nft file", "err", err.Error())
Expand All @@ -80,6 +81,7 @@ func handleMsgCreateNft(goCtx sdk.Context, k keeper.Keeper, msg *types.MsgCreate
}

func handleMsgPublishFile(ctx sdk.Context, k Keeper, msg *types.MsgPublishFile) (*sdk.Result, error) {
fmt.Println("Handling PublishFileMsg")
k.Logger(ctx).Debug("Publish file message received", "id", msg.Id)
var metainfo metainfo.MetaInfo
bencode.DecodeBytes(msg.Metainfo, &metainfo)
Expand Down

0 comments on commit b6c4153

Please sign in to comment.