# Packages
No description provided by the author
# Functions
CandidatesToMap converts a candidate list to map of cachedCandidates.
Deserialize check if input is Deserializer, if it is, use the input's Deserialize method, otherwise use Gob.
EmptyAccount returns an empty account.
MapToCandidates converts a map of cachedCandidates to candidate list.
NewIterator returns an interator given a list of serialized states.
Serialize check if input is Serializer, if it is, use the input's Serialize method, otherwise use Gob.
# Variables
ErrAccountCollision is the error that the account already exists.
ErrCandidate indicates the error of candidate.
ErrCandidateList indicates the error of candidate list.
ErrCandidateMap indicates the error of candidate map.
ErrCandidatePb indicates the error of protobuf's candidate message.
ErrNotEnoughBalance is the error that the balance is not enough.
ErrOutOfBoundary defines an error when the index in the iterator is out of boundary.
ErrStateDeserialization is the error that the state un-marshaling is failed.
ErrStateNotExist is the error that the state does not exist.
ErrStateSerialization is the error that the state marshaling is failed.
# Interfaces
Deserializer has Deserialize method to deserialize binary data to struct.
Iterator defines an interator to read a set of states.
Serializer has Serialize method to serialize struct to binary data.
State is the interface, which defines the common methods for state struct to be handled by state factory.