-
Notifications
You must be signed in to change notification settings - Fork 57
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
last_hash = block.hash.clone(); #4
Comments
Hi Moaiad, Regarding the last_hash warning, the compiler is trying to tell you "you're modifying this variable but do nothing with it after -> you might not need to modify it" Two solutions for this :
Regarding the InsufficientInputValue I can't reproduce the warning. Regards, Clement |
I get this as well on a clean
I added some logging:
|
thanks for your efforts and time , I have a warrning when I run cargo as it couldn't read last hash I couldn't figure the issue that cause the problem as well as Failed to add block: InsufficientInputValue' where should the value stored:
please check the result
warning: value assigned to
last_hash
is never read--> src/main.rs:63:5
|
63 | last_hash = block.hash.clone();
| ^^^^^^^^^
|
= note:
#[warn(unused_assignments)]
on by default= help: maybe it is overwritten before being read?
warning:
hash
(bin "blockchain") generated 1 warningFinished dev [unoptimized + debuginfo] target(s) in 0.12s
Running
target/debug/blockchain
Mined genesis block Block[0]: e2937e782fc68a1a0f8f71830f69919136139f6f956fda1e6999f57327070100 at: 1651809036733 with: 1 nonce: 3458
Mined block Block[1]: cb8add22253b754895c232b4ca65f57dcbb42b1ebdb5bd80242e4fdea6b50500 at: 1651809036998 with: 2 nonce: 4312
thread 'main' panicked at 'Failed to add block: InsufficientInputValue', src/main.rs:65:41
note: run with
RUST_BACKTRACE=1
environment variable to display a backtracethanks for the nice topic
The text was updated successfully, but these errors were encountered: