Page MenuHomePhabricator

[ecash-herald] Remember to pass the staking info param for daily summary msg
ClosedPublic

Authored by bytesofman on Tue, Nov 26, 06:15.

Details

Summary

Code landed in D17195 but did not implement in event handler

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
patch-herald-dailies
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31320
Build 62138: Build Diffecash-herald-tests
Build 62137: arc lint + arc unit

Event Timeline

emack requested changes to this revision.Tue, Nov 26, 10:33
emack added a subscriber: emack.
emack added inline comments.
apps/ecash-herald/src/events.ts
372

but you're not returning here, and it's proceeding to summarizeTxHistory below.

This revision now requires changes to proceed.Tue, Nov 26, 10:33
bytesofman marked an inline comment as done.
bytesofman added inline comments.
apps/ecash-herald/src/events.ts
372

this is the existing behavior. activeStakers stays undefined, and we simply do not include the msg lines that depend on activeStakers.

We do not want to return if we miss the price API call or the active stakers API call. We still send the msg, just not with the info we fail to get.

we "should" be testing the parent function, handleUtcMidnight, but it's not trivial to mock a days worth of blockTxs. You can see this is the same logic used in getDailySummary.ts, which can be tested with ts-node scripts/getDailySummary

This revision is now accepted and ready to land.Tue, Nov 26, 13:32