Page MenuHomePhabricator

[ecash-herald] Send daily summaries based on time (like cron) and not block timestamps
ClosedPublic

Authored by bytesofman on Oct 23 2024, 13:13.

Details

Summary

Send herald daily summaries using a cron job, instead of sending them "after the first block with a timestamp on a new day"

This allows us to send messages at the same time every day.

We also send these cron job messages to a new channel. Having a channel dedicated to daily summaries is more user friendly than a channel of all the blocks, which is more for power users and devs.

Note: for now, we keep the "send daily summaries to main herald channel on first block of the new day" functionality. Want to make sure this works before taking that out.

Test Plan

npm test, edit cronjob terms in index.js for 5 min in the future, node index.js, msg sends in 5 minutes to channel configured in secrets.js

Diff Detail

Repository
rABC Bitcoin ABC
Branch
summaries-cron
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30756
Build 61028: Build Diffecash-herald-tests
Build 61027: arc lint + arc unit

Event Timeline

update secrets.sample.js with new key for daily channel id

bytesofman edited the summary of this revision. (Show Details)

Failed tests logs:

====== parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices ======
AssertionError: Expected values to be loosely deep-equal:  [   '<b>15 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +     'Trading volume: $5,957,333\n' +     'Market cap: $689,047,178\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned $33</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="h...  should loosely deep-equal  [   '<b>14 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +     'Trading volume: $5,957,333\n' +     'Market cap: $689,047,178\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned $33</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="h...
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

[
  '<b>15 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +
    'Trading volume: $5,957,333\n' +
    'Market cap: $689,047,178\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned $33</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="h...

should loosely deep-equal

[
  '<b>14 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +
    'Trading volume: $5,957,333\n' +
    'Market cap: $689,047,178\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned $33</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="h...
    at Context.<anonymous> (test/parse.test.js:354:16)
    at process.processImmediate (node:internal/timers:483:21)

      + expected - actual

       [
      -  "<b>15 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\nTrading volume: $5,957,333\nMarket cap: $689,047,178\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned $33</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, $1"
      +  "<b>14 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\nTrading volume: $5,957,333\nMarket cap: $689,047,178\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned $33</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, $1"
       ]
====== parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price ======
AssertionError: Expected values to be loosely deep-equal:  [   '<b>15 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +     '2. <a href...  should loosely deep-equal  [   '<b>14 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +     '2. <a href...
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

[
  '<b>15 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +
    '2. <a href...

should loosely deep-equal

[
  '<b>14 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +
    '2. <a href...
    at Context.<anonymous> (test/parse.test.js:405:16)
    at process.processImmediate (node:internal/timers:483:21)

      + expected - actual

       [
      -  "<b>15 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned 937,620 XEC</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, 19,720 XEC"
      +  "<b>14 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned 937,620 XEC</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, 19,720 XEC"
       ]

Each failure log is accessible here:
parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices
parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price

Failed tests logs:

====== parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices ======
AssertionError: Expected values to be loosely deep-equal:  [   '<b>15 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +     'Trading volume: $5,957,333\n' +     'Market cap: $689,047,178\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned $33</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="h...  should loosely deep-equal  [   '<b>14 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +     'Trading volume: $5,957,333\n' +     'Market cap: $689,047,178\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned $33</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="h...
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

[
  '<b>15 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +
    'Trading volume: $5,957,333\n' +
    'Market cap: $689,047,178\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned $33</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="h...

should loosely deep-equal

[
  '<b>14 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\n' +
    'Trading volume: $5,957,333\n' +
    'Market cap: $689,047,178\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned $33</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="h...
    at Context.<anonymous> (test/parse.test.js:354:16)
    at process.processImmediate (node:internal/timers:483:21)

      + expected - actual

       [
      -  "<b>15 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\nTrading volume: $5,957,333\nMarket cap: $689,047,178\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned $33</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, $1"
      +  "<b>14 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b>1 XEC = $0.00003487</b> <i>(-0.40%)</i>\nTrading volume: $5,957,333\nMarket cap: $689,047,178\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned $33</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, $1"
       ]
====== parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price ======
AssertionError: Expected values to be loosely deep-equal:  [   '<b>15 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +     '2. <a href...  should loosely deep-equal  [   '<b>14 Oct 2024</b>\n' +     '1,331 blocks\n' +     '➡️15 txs\n' +     '\n' +     '<b><i>⛏️3 miners found blocks</i></b>\n' +     '<u>Top 3</u>\n' +     '1. Mining-Dutch, 1 <i>(0%)</i>\n' +     '2. solopool.org, 1 <i>(0%)</i>\n' +     '3. ViaBTC, 1 <i>(0%)</i>\n' +     '\n' +     '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +     '<u>Top 3</u>\n' +     '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +     '2. <a href...
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

[
  '<b>15 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +
    '2. <a href...

should loosely deep-equal

[
  '<b>14 Oct 2024</b>\n' +
    '1,331 blocks\n' +
    '➡️15 txs\n' +
    '\n' +
    '<b><i>⛏️3 miners found blocks</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. Mining-Dutch, 1 <i>(0%)</i>\n' +
    '2. solopool.org, 1 <i>(0%)</i>\n' +
    '3. ViaBTC, 1 <i>(0%)</i>\n' +
    '\n' +
    '<b><i>3 stakers earned 937,620 XEC</i></b>\n' +
    '<u>Top 3</u>\n' +
    '1. <a href="https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu">qzs...2nu</a>, 1 <i>(0%)</i>\n' +
    '2. <a href...
    at Context.<anonymous> (test/parse.test.js:405:16)
    at process.processImmediate (node:internal/timers:483:21)

      + expected - actual

       [
      -  "<b>15 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned 937,620 XEC</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, 19,720 XEC"
      +  "<b>14 Oct 2024</b>\n1,331 blocks\n➡️15 txs\n\n<b><i>⛏️3 miners found blocks</i></b>\n<u>Top 3</u>\n1. Mining-Dutch, 1 <i>(0%)</i>\n2. solopool.org, 1 <i>(0%)</i>\n3. ViaBTC, 1 <i>(0%)</i>\n\n<b><i>3 stakers earned 937,620 XEC</i></b>\n<u>Top 3</u>\n1. <a href=\"https://explorer.e.cash/address/ecash:qzs8hq2pj4hu5j09fdr5uhha3986h2mthvfp7362nu\">qzs...2nu</a>, 1 <i>(0%)</i>\n2. <a href=\"https://explorer.e.cash/address/ecash:qr42c8c04tqndscfrdnl0rzterg0qdaegyjzt8egyg\">qr4...gyg</a>, 1 <i>(0%)</i>\n3. <a href=\"https://explorer.e.cash/address/ecash:qqvhatumna957qu0je78dnc9pc7c7hu89crkq6k0cd\">qqv...0cd</a>, 1 <i>(0%)</i>\n\n<a href=\"https://cashtab.com/\">Cashtab</a>\n <b>1</b> new user received <b>42 XEC</b>\n <b>1</b> <a href=\"https://explorer.e.cash/tx/aed861a31b96934b88c0252ede135cb9700d7649f69191235087a3030e553cb1\">CACHET</a> reward\n\n <b>1</b> token tx\n\n <b><i>8 app txs</i></b>\n <b>1</b> <a href=\"https://www.ecashchat.com/\">Article/Reply tx</a>\n⚛️ <b>1</b> CashFusion\n <b>1</b> PayButton tx\n <b>1</b> Airdrop\n✏️ <b>1</b> Cashtab Msg\n <b>1</b> <a href=\"https://www.ecashchat.com/\">eCashChat tx</a>\n <b>1</b> eCashChat Auth\n <b>1</b> Paywall tx\n\n <b><i>Binance</i></b>\n<b>1</b> withdrawal, 19,720 XEC"
       ]

Each failure log is accessible here:
parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks including fiat prices
parse.js functions: summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price.parse.js functions summarizeTxHistory summarizes a collection of txs across multiple blocks without fiat price

This revision is now accepted and ready to land.Oct 23 2024, 14:13