Closed aljo242 closed 2 years ago
I regenerated the proto
files using make proto-gen
and make proto-format
so many of them were modified.
Merging #936 (3d631b3) into develop (ae4ee27) will increase coverage by
0.02%
. The diff coverage is18.70%
.
@@ Coverage Diff @@
## develop #936 +/- ##
===========================================
+ Coverage 10.75% 10.77% +0.02%
===========================================
Files 280 280
Lines 66957 67091 +134
===========================================
+ Hits 7199 7227 +28
- Misses 59595 59702 +107
+ Partials 163 162 -1
Impacted Files | Coverage Δ | |
---|---|---|
pkg/types/monitoring.pb.go | 0.79% <ø> (ø) |
|
x/campaign/types/events.pb.go | 0.55% <ø> (ø) |
|
x/campaign/types/mainnet_account.pb.go | 0.75% <ø> (ø) |
|
x/campaign/types/params.pb.go | 0.88% <ø> (ø) |
|
x/campaign/types/query.pb.go | 0.66% <ø> (ø) |
|
x/campaign/types/query.pb.gw.go | 0.00% <ø> (ø) |
|
x/launch/types/chain.pb.go | 1.53% <0.00%> (-0.07%) |
:arrow_down: |
x/launch/types/events.pb.go | 0.49% <ø> (ø) |
|
x/launch/types/genesis_account.pb.go | 0.98% <ø> (ø) |
|
x/launch/types/genesis_validator.pb.go | 0.56% <ø> (ø) |
|
... and 28 more |
What's your reasoning to consider it should be named DefaultAccountBalance
?
To me, it's a balance imposed by the coordinator. Default would mean this is the value set if the account doesn't provide a specific amount.
But it can be argued as well we can name it to "default" because this the balance that will be defined by default or accounts at first before the chain is launched and coins are moving
What's your reasoning to consider it should be named
DefaultAccountBalance
?To me, it's a balance imposed by the coordinator. Default would mean this is the value set if the account doesn't provide a specific amount.
But it can be argued as well we can name it to "default" because this the balance that will be defined by default or accounts at first before the chain is launched and coins are moving
Yeah, I agree default doesn't make as much sense as I originally thought. I'm going to change it back to AccountBalance
Hey @aljo242 is it ready for reviews?
I also wanted to add that we should add a test case in TestApplyRequest
for the particular case the balance is defined
But I realize the current structure of TestApplyRequest
is hard to maintain and should be improved first https://github.com/tendermint/spn/issues/944
Closes #927
What does this PR do?
Adds the
DefaultAccountBalance
field toChain
andMsgCreateChain
. If this field is empty (sdk.NewCoins()
). the behavior is unchanged. However, if it is populated, the balances of accounts that are created duringkeeper.ApplyRequest()
are set tochain.DefaultAccountBalance
.How to test?