-
Notifications
You must be signed in to change notification settings - Fork 112
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
fix(ref-imp): make bitcoin logic make less calls to db #906
Conversation
@@ -309,13 +309,13 @@ describe('BitcoinProcessor', () => { | |||
describe('transactions', () => { | |||
it('should get transactions since genesis capped by page size in blocks', async (done) => { | |||
const verifyMock = spyOn(bitcoinProcessor, 'verifyBlock' as any).and.returnValue(Promise.resolve(true)); | |||
// return as many as page size | |||
const transactions: TransactionModel[] = createTransactions(BitcoinProcessor['pageSizeInBlocks'], bitcoinProcessor['genesisBlockNumber'], true); | |||
bitcoinProcessor['lastProcessedBlock'] = { |
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.
Sanity: the test is getting transaction since genesis, so shouldn't lastProcessedBlock
be undefined
?
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.
This is simulating the caller trying to get transactions since genesis (genesis to genesis + 99), and bitcoin's last Processed block is genesis + 100
No description provided.