From c7a50fbe7422cbfb079444bee83fba8f5e1c17de Mon Sep 17 00:00:00 2001 From: yjwxfq <112159687+yjwxfq@users.noreply.github.com> Date: Wed, 31 May 2023 17:25:04 +0800 Subject: [PATCH] Update abstore.go parameter judgment when the transaction Signed-off-by: yjwxfq <112159687+yjwxfq@users.noreply.github.com> --- chaincode/abstore/go/abstore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chaincode/abstore/go/abstore.go b/chaincode/abstore/go/abstore.go index 8dd78d4f..8537f39a 100644 --- a/chaincode/abstore/go/abstore.go +++ b/chaincode/abstore/go/abstore.go @@ -50,7 +50,7 @@ func (t *ABstore) Init(ctx contractapi.TransactionContextInterface, A string, Av // Transaction makes payment of X units from A to B 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") } var err error