From b75525ba492f53210f8bbb0105557dfec13f06fa Mon Sep 17 00:00:00 2001 From: sahithn Date: Tue, 6 Apr 2021 15:29:01 +0530 Subject: [PATCH] update spec --- x/bank/keeper/keeper.go | 2 +- x/bank/spec/01_state.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index e94f50245ad6..9704e1595e8d 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -189,7 +189,7 @@ func (k BaseKeeper) GetSupply(ctx sdk.Context, denom string) sdk.Coin { var amount sdk.Int err := amount.Unmarshal(bz) if err != nil { - panic("unexpected supply") + panic(fmt.Errorf("unable to unmarshal supply value %v", err)) } return sdk.Coin{ diff --git a/x/bank/spec/01_state.md b/x/bank/spec/01_state.md index 4b8a512489e6..5328e8b3caee 100644 --- a/x/bank/spec/01_state.md +++ b/x/bank/spec/01_state.md @@ -7,6 +7,6 @@ order: 1 The `x/bank` module keeps state of three primary objects, account balances, denom metadata and the total supply of all balances. -- Supply: `0x0 | byte(denom) -> ProtocolBuffer(coin)` +- Supply: `0x0 | byte(denom) -> byte(amount)` - Denom Metadata: `0x1 | byte(denom) -> ProtocolBuffer(Metadata)` - Balances: `0x2 | byte(address length) | []byte(address) | []byte(balance.Denom) -> ProtocolBuffer(balance)`