From 2ef5b26b1b4bbf50193df6bbfa2dbe0a688d4572 Mon Sep 17 00:00:00 2001 From: Pierre Chambart Date: Sat, 23 Jun 2018 03:21:53 +0200 Subject: [PATCH] Fix wrong test directions --- src/proto_alpha/lib_protocol/src/contract_storage.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/src/contract_storage.ml b/src/proto_alpha/lib_protocol/src/contract_storage.ml index 1b8b49252..e4da1f68c 100644 --- a/src/proto_alpha/lib_protocol/src/contract_storage.ml +++ b/src/proto_alpha/lib_protocol/src/contract_storage.ml @@ -474,8 +474,8 @@ let paid_storage_space c contract = | Some paid_space -> return paid_space let record_paid_storage_space c contract paid_storage = - Storage.Contract.Paid_storage_space.get c contract >>=? fun already_paid_fees -> - if Compare.Z.(already_paid_fees < paid_storage) then + Storage.Contract.Used_storage_space.get c contract >>=? fun already_paid_fees -> + if Compare.Z.(already_paid_fees >= paid_storage) then return (Z.zero, c) else let to_pay = Z.sub paid_storage already_paid_fees in