Closed kastolars closed 5 years ago
I don't think we can use byte slice as a key for maps in golang, but we can encode the wallet address to string and use that as a key instead.
...map keys may be of any type that is comparable...Notably absent from the list are slices, maps, and functions; these types cannot be compared using ==, and may not be used as map keys. -From https://blog.golang.org/go-maps-in-action
How about we hex encode to string?
Completed
See: #268
Make a new package pertaining to pending pool.
Make a struct that contains a pending balance and pending state nonce.
Make a struct that contains a map who's key is a wallet address and who's value is of the type of the above struct.
I don't think there need to be any tests for this. A couple of
New
constructor functions might be nice.Help with maps: https://blog.golang.org/go-maps-in-action