Use Genesis.getHash() again instead of static value

This commit is contained in:
nicksavers 2014-05-21 19:36:03 +02:00
parent 2f73b98614
commit b69c355dba
1 changed files with 1 additions and 7 deletions

View File

@ -3,23 +3,18 @@ package org.ethereum.manager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
import org.ethereum.core.Block; import org.ethereum.core.Block;
import org.ethereum.core.Genesis; import org.ethereum.core.Genesis;
import org.ethereum.core.Transaction; import org.ethereum.core.Transaction;
import org.ethereum.core.Wallet; import org.ethereum.core.Wallet;
import org.ethereum.crypto.HashUtil; import org.ethereum.crypto.HashUtil;
import org.ethereum.geodb.IpGeoDB;
import org.ethereum.net.client.ClientPeer; import org.ethereum.net.client.ClientPeer;
import org.ethereum.net.client.PeerData; import org.ethereum.net.client.PeerData;
import org.ethereum.net.message.StaticMessages; import org.ethereum.net.message.StaticMessages;
import org.spongycastle.util.encoders.Hex; import org.spongycastle.util.encoders.Hex;
import com.maxmind.geoip.Location;
/** /**
* www.ethereumJ.com * www.ethereumJ.com
* User: Roman Mandeleil * User: Roman Mandeleil
@ -91,9 +86,8 @@ public class MainData {
} }
public byte[] getLatestBlockHash(){ public byte[] getLatestBlockHash(){
if (blockChainDB.isEmpty()) if (blockChainDB.isEmpty())
return StaticMessages.GENESIS_HASH; return (new Genesis()).getHash();
else else
return blockChainDB.get(blockChainDB.size() - 1).getHash(); return blockChainDB.get(blockChainDB.size() - 1).getHash();
} }