When I read the wallet file using the code in the original code, I encountered this error: gob: type elliptic.p256Curve has no exported fields. This is due to the fact that the elliptic.p256Curve type in the crypto/elliptic package has no exported fields, whereas the Gob encoder requires that all fields in the struct must be exported. So I defined an exportable type, SerializableWallet, to store the parameters of the elliptic curve, and modified the decoding and encoding parts of the LoadFromFile and SaveToFile methods. |
||
---|---|---|
.gitignore | ||
README.md | ||
base58.go | ||
base58_test.go | ||
block.go | ||
blockchain.go | ||
blockchain_iterator.go | ||
cli.go | ||
cli_createblockchain.go | ||
cli_createwallet.go | ||
cli_getbalance.go | ||
cli_listaddress.go | ||
cli_printchain.go | ||
cli_reindexutxo.go | ||
cli_send.go | ||
cli_startnode.go | ||
main.go | ||
merkle_tree.go | ||
merkle_tree_test.go | ||
proofofwork.go | ||
server.go | ||
transaction.go | ||
transaction_input.go | ||
transaction_output.go | ||
utils.go | ||
utxo_set.go | ||
wallet.go | ||
wallets.go |
README.md
Blockchain in Go
A blockchain implementation in Go, as described in these articles: