MCPcopy Create free account
hub / github.com/akash-network/node / addCoin

Function addCoin

x/verification/keeper/msg.go:1793–1801  ·  view source on GitHub ↗
(a, b sdk.Coin)

Source from the content-addressed store, hash-verified

1791}
1792
1793func addCoin(a, b sdk.Coin) (sdk.Coin, error) {
1794 if a.IsNil() || a.IsZero() {
1795 return b, nil
1796 }
1797 if !coinsSameDenom(a, b) {
1798 return sdk.Coin{}, errorsmod.Wrapf(moduletypes.ErrInvalidReason, "denom mismatch %s/%s", a.Denom, b.Denom)
1799 }
1800 return a.Add(b), nil
1801}
1802
1803func requireCoinAtLeast(got, want sdk.Coin, err error) error {
1804 if !coinAtLeast(got, want) {

Callers 3

PostAuditorBondMethod · 0.85
PostProviderBondMethod · 0.85

Calls 1

coinsSameDenomFunction · 0.85

Tested by

no test coverage detected