mimblewimble / grin-explorer

Blockchain explorer for grin
GNU Affero General Public License v3.0
59 stars 53 forks source link

Compute difficulty from total difficulty #15

Closed quentinlesceller closed 6 years ago

quentinlesceller commented 6 years ago

After Update to Testnet2 https://github.com/mimblewimble/grin-explorer/pull/14 we need to compute the difficulty from the total difficulty. See https://github.com/mimblewimble/grin/pull/777 for reference. TLDR:

let target_difficulty = header.total_difficulty.clone() - prev.total_difficulty.clone();
hendi commented 6 years ago

Fixed with 7d89ab0