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:
@ -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)
|
||||
|
Reference in New Issue
Block a user