FromAccountAndNonce generates databaseID from Account and its nonce.
(accountAddress AccountAddress, nonce uint32)
| 178 | |
| 179 | // FromAccountAndNonce generates databaseID from Account and its nonce. |
| 180 | func FromAccountAndNonce(accountAddress AccountAddress, nonce uint32) DatabaseID { |
| 181 | addrAndNonce := fmt.Sprintf("%s%d", accountAddress.String(), nonce) |
| 182 | rawID := hash.THashH([]byte(addrAndNonce)) |
| 183 | return DatabaseID(rawID.String()) |
| 184 | } |