-
Notifications
You must be signed in to change notification settings - Fork 748
refactor genesis building logic in avm and platformvm #3949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
"Jz9ayEDt7dx9hDx45aXALujWmL9ZUuqe7", | ||
} | ||
|
||
func TestBuildGenesis(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back this test, which was removed in #2589. I think its worth keeping for testing the BuildGenesis
function, but please let me know if this should just be removed or needs adjustments.
90ec163
to
9d9fbcd
Compare
vms/avm/genesis_builder.go
Outdated
@@ -88,7 +80,7 @@ type BuildGenesisReply struct { | |||
|
|||
// BuildGenesis returns the UTXOs such that at least one address in [args.Addresses] is | |||
// referenced in the UTXO. | |||
func (*StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error { | |||
func BuildGenesis(args *BuildGenesisArgs, reply *BuildGenesisReply) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also get rid of all these args/reply structs and just make them parameters/return values/structs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep good point, i'll update this
Why this should be merged
Resolves #2613, we no longer need static structs to create genesis.
How this works
StaticService
from bothplaftformvm
andavm
BuildGenesis
How this was tested
unit test