Skip to content

API: Update state delta type, handler#5123

Merged
winder merged 1 commit into
algorand:masterfrom
Eric-Warehime:remove-defined-deltas
Feb 10, 2023
Merged

API: Update state delta type, handler#5123
winder merged 1 commit into
algorand:masterfrom
Eric-Warehime:remove-defined-deltas

Conversation

@Eric-Warehime
Copy link
Copy Markdown
Contributor

Summary

Updates the LedgerStateDelta type to be generic so that we can maintain backwards compatibility w/ the types Indexer is used to.

I wasn't sure exactly what to do with the convert vb binary so I've just updated it to remove the dead code.

Test Plan

Updated handler tests--probably the more useful tests will be in the sdk.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 9, 2023

Codecov Report

Merging #5123 (63d6ee2) into master (42a112a) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #5123      +/-   ##
==========================================
- Coverage   53.45%   53.43%   -0.03%     
==========================================
  Files         432      431       -1     
  Lines       54501    54364     -137     
==========================================
- Hits        29132    29047      -85     
+ Misses      23101    23060      -41     
+ Partials     2268     2257      -11     
Impacted Files Coverage Δ
daemon/algod/api/server/v2/account.go 77.52% <ø> (+1.37%) ⬆️
daemon/algod/api/server/v2/handlers.go 0.82% <0.00%> (-0.01%) ⬇️
daemon/algod/api/server/v2/test/helpers.go 75.33% <ø> (ø)
catchup/service.go 67.76% <0.00%> (-0.48%) ⬇️
ledger/acctupdates.go 68.99% <0.00%> (-0.25%) ⬇️
network/wsNetwork.go 65.16% <0.00%> (+0.18%) ⬆️
ledger/acctonline.go 79.16% <0.00%> (+0.52%) ⬆️
ledger/tracker.go 75.10% <0.00%> (+0.84%) ⬆️
agreement/proposalManager.go 98.03% <0.00%> (+1.96%) ⬆️
agreement/cryptoVerifier.go 69.71% <0.00%> (+2.11%) ⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines 53 to 56
func (l *mockLedger) GetStateDeltaForRound(rnd basics.Round) (ledgercore.StateDelta, error) {
panic("implement me")
args := l.Called(rnd)
return args.Get(0).(ledgercore.StateDelta), args.Error(1)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat.

Delta: modelDelta,
}
err = enc.Encode(conduitType)
err = enc.Encode(algodType)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file can be removed. it was used to convert ledgercore.StateDelta to model.LedgerStateDelta

@winder winder changed the title algod: Update state delta type, handler API: Update state delta type, handler Feb 10, 2023
@winder winder merged commit 4bc7250 into algorand:master Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants