helium / blockchain-core

Apache License 2.0
213 stars 85 forks source link

Fix dialyzer, no error on cache_put #1338

Closed vihu closed 2 years ago

vihu commented 2 years ago

Problem

Dialyzer complains on master branch with:

src/ledger/v1/blockchain_ledger_v1.erl
Line 2194 Column 37: The variable _ can never match since previous clauses completely covered the type 'ok'

Solution

blockchain_ledger_v1:cache_put can never actually return any error, this propagates that up the stack and fixes the call to promote_to_public_poc/2.