diff options
-rw-r--r-- | core/test/state.go | 3 | ||||
-rw-r--r-- | core/utils/utils.go | 16 |
2 files changed, 3 insertions, 16 deletions
diff --git a/core/test/state.go b/core/test/state.go index a1af47c..e943a8a 100644 --- a/core/test/state.go +++ b/core/test/state.go @@ -532,6 +532,9 @@ func (req reqByTime) Less(i, j int) bool { // Apply change requests, this function would also // be called when we extract these request from delivered blocks. func (s *State) Apply(reqsAsBytes []byte) (err error) { + if len(reqsAsBytes) == 0 { + return + } // Try to unmarshal this byte stream into []*StateChangeRequest. reqs, err := s.unpackRequests(reqsAsBytes) if err != nil { diff --git a/core/utils/utils.go b/core/utils/utils.go index 687d0ea..8c9f77a 100644 --- a/core/utils/utils.go +++ b/core/utils/utils.go @@ -15,22 +15,6 @@ // along with the dexon-consensus library. If not, see // <http://www.gnu.org/licenses/>. -// This file is part of the dexon-consensus library. -// -// The dexon-consensus library is free software: you can redistribute it -// and/or modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// The dexon-consensus library is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser -// General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the dexon-consensus library. If not, see -// <http://www.gnu.org/licenses/>. - package utils import ( |