dartcoin / dart-bitcoin

Bitcoin library written in Google Dart (dartlang.org).
http://dartcoin.org
MIT License
33 stars 17 forks source link

How should Block_test.PoW throw VerificationException? #18

Open RdeWilde opened 6 years ago

RdeWilde commented 6 years ago

In the block_test "PoW" it has these lines:

      // Break the nonce again at the lower difficulty level so we can try solving for it.
      block.nonce = 1;
      expect(() => block.verify(params, true), throwsA(new isInstanceOf<VerificationException>()));

As it didn't throw the expected exception, I was going thru the code. But I can't find where it should throw the Exception as a result of the changed nonce.

Can you point me to it?

RdeWilde commented 6 years ago

https://github.com/dartcoin/dart-bitcoin/blob/master/test/core/block_test.dart#L74

It should be out there...

Should it be this line? https://github.com/dartcoin/dart-bitcoin/blob/master/lib/src/core/block.dart#L180