Skip to content

Commit f576ffd

Browse files
1 parent 0e47620 commit f576ffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/noobchain/Block.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void mineBlock(int difficulty) {
4646
public boolean addTransaction(Transaction transaction) {
4747
//process transaction and check if valid, unless block is genesis block then ignore.
4848
if(transaction == null) return false;
49-
if((previousHash != "0")) {
49+
if((!"0".equals(previousHash))) {
5050
if((transaction.processTransaction() != true)) {
5151
System.out.println("Transaction failed to process. Discarded.");
5252
return false;

0 commit comments

Comments
 (0)