public void should_clone_peer() { var peer1 = new StampPeer(Guid.NewGuid()); var block1 = peer1.GenerateBlock("001", DateTime.Now); peer1.AddBlock(block1); var peer2 = peer1.Clone(); var block2 = peer1.GenerateBlock("002", DateTime.Now); peer1.AddBlock(block2); peer2.AddBlock(block2); }
public void should_calculate_peer_hash() { var peer1 = new StampPeer(Guid.NewGuid()); var block1 = peer1.GenerateBlock("001", DateTime.Now); peer1.AddBlock(block1); var peer2 = peer1.Clone(); var block2 = peer1.GenerateBlock("002", DateTime.Now); peer1.AddBlock(block2); peer2.AddBlock(block2); Assert.AreEqual(peer1.PeerHash, peer2.PeerHash); }