From 8910a89799b0e146afc2adcd08694fb54ea12ed3 Mon Sep 17 00:00:00 2001 From: louielong Date: Tue, 9 Jul 2019 14:18:23 +0800 Subject: [PATCH] Add remove function success return value Due to the bool initial value is `false`, the `success` value need to be set `true` after remove data. --- library/iterable_mapping.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/library/iterable_mapping.sol b/library/iterable_mapping.sol index 7572154..351dfde 100644 --- a/library/iterable_mapping.sol +++ b/library/iterable_mapping.sol @@ -32,6 +32,7 @@ library IterableMapping delete self.data[key]; self.keys[keyIndex - 1].deleted = true; self.size --; + return true; } function contains(itmap storage self, uint key) returns (bool) {