Added IsValidNonnegative to coins module
This commit is contained in:
parent
0307321051
commit
3703121f09
|
@ -127,6 +127,11 @@ func (coins Coins) IsValid() bool {
|
|||
}
|
||||
}
|
||||
|
||||
// IsValidNonnegative tests is coins IsValid and IsNonnegative
|
||||
func (coins Coins) IsValidNonnegative() bool {
|
||||
return coins.IsValid() && coins.IsNonnegative()
|
||||
}
|
||||
|
||||
// Plus combines to sets of coins
|
||||
//
|
||||
// TODO: handle empty coins!
|
||||
|
|
Loading…
Reference in New Issue