mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-23 01:55:10 +00:00
Update abstore.go parameter judgment when the transaction
Signed-off-by: yjwxfq <112159687+yjwxfq@users.noreply.github.com>
This commit is contained in:
parent
9169301edc
commit
c7a50fbe74
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ func (t *ABstore) Init(ctx contractapi.TransactionContextInterface, A string, Av
|
||||||
|
|
||||||
// Transaction makes payment of X units from A to B
|
// Transaction makes payment of X units from A to B
|
||||||
func (t *ABstore) Invoke(ctx contractapi.TransactionContextInterface, A, B string, X int) error {
|
func (t *ABstore) Invoke(ctx contractapi.TransactionContextInterface, A, B string, X int) error {
|
||||||
if X < 0 {
|
if X <= 0 {
|
||||||
return fmt.Errorf("X input is wrong, it should be greater than 0")
|
return fmt.Errorf("X input is wrong, it should be greater than 0")
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue