gob: type elliptic.p256Curve has no exported fields
mithleshmeghwal0 opened this issue · comments
part_5 createwallet not working @Jeiwan
@mithleshmeghwal0 Which code section?
elliptic.p256Curve
should have no exported fields, right? Because of p
being lowercase. Inspecting further.
The field is not accessible outside the file.
Yup, i inspected until this point, but can we do any work around this ?
For context, https://stackoverflow.com/questions/32676898/whats-the-purpose-of-gob-register-method
The problem is saving the wallets map so that we can always reconstruct the data... Just thinking out loud.
One way might be to create your own type/interface to access to field...
https://stackoverflow.com/questions/42664837/how-to-access-unexported-struct-fields
Yup, i will try to create interface and i will comment or probably create PR for this . Thanks @BryceWayne
@BryceWayne i tried to build a package with elliptic , but it still failed
@Jeiwan
Line 87 in f35aa3c
its failing on this line
Screeshot is from my local, so line number may differ
Did you fix these,please?
Seems @LangLiBa this repo is outdated, i created this issue long ago, there is no reply. I fixed this by using 1.18.9 go version.
I could have pursued to fix this, but my objective was to learn blockchain, not to fix this
Seems @LangLiBa this repo is outdated, i created this issue long ago, there is no reply. I fixed this by using 1.18.9 go version. I could have pursued to fix this, but my objective was to learn blockchain, not to fix this
Ok, thanks a lot.
Seems @LangLiBa this repo is outdated, i created this issue long ago, there is no reply. I fixed this by using 1.18.9 go version. I could have pursued to fix this, but my objective was to learn blockchain, not to fix this
Thanks @mithleshmeghwal0
I'm getting the same error, how should I fix this problem
Is there another solution? Or please update the code based on the latest go version?thx.
Here is my workaround (see lns 89-143). Then remove ln 66 and ln 82 from wallets.go.
I implemented GobEncoder/GobDecoder interfaces to the Wallet
struct so gob.Register(elliptic.P256())
can be removed.