Minor refactoring

I think having the read method in the same place as the write method might help preventing some errors
There are some people who are strictly against using static methods. I suppose I'm not experienced enough yet.
This commit is contained in:
2015-04-18 16:17:37 +02:00
parent 2cd857dd36
commit 51c1ecfd41
15 changed files with 116 additions and 58 deletions

View File

@ -21,6 +21,7 @@ import ch.dissem.bitmessage.entity.Version;
import ch.dissem.bitmessage.entity.payload.ObjectPayload;
import ch.dissem.bitmessage.entity.valueobject.NetworkAddress;
import ch.dissem.bitmessage.ports.NetworkHandler;
import ch.dissem.bitmessage.utils.UnixTime;
import org.junit.Test;
/**
@ -44,7 +45,7 @@ public class NetworkNodeTest {
new Version.Builder()
.version(3)
.services(1)
.timestamp(System.currentTimeMillis() / 1000)
.timestamp(UnixTime.now())
.addrFrom(localhost)
.addrRecv(localhost)
.nonce(-1)