Skip to content

Commit

Permalink
more prints
Browse files Browse the repository at this point in the history
  • Loading branch information
avendauz committed Aug 9, 2021
1 parent 1d73dc1 commit 6a91e18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/nft/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,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) {
k.Logger(ctx).Debug("Publish file message received", "id", msg.Id)
fmt.Println("Publish file message recieved")
var metainfo metainfo.MetaInfo
bencode.DecodeBytes(msg.Metainfo, &metainfo)
k.BtClient.RetrieveFile(&metainfo)
Expand All @@ -96,6 +97,8 @@ func handleMsgPublishFile(ctx sdk.Context, k Keeper, msg *types.MsgPublishFile)
UserId: msg.UserId,
Mime: msg.Mime,
}
fmt.Println("writing .info file")

err = ioutil.WriteFile(k.HomeDir+"/nft/"+msg.Hash+".info", k.Cdc.MustMarshalJSON(&info), 0666)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6a91e18

Please sign in to comment.