-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBlock.cs
62 lines (54 loc) · 1.31 KB
/
Block.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
namespace blockchain.net
{
public class Block
{
public Block(int index, string previousHash, long timestamp, dynamic data, string hash, int nonce)
{
this.Index = index;
this.PreviousHash = previousHash;
this.Timestamp = timestamp;
this.Data = data;
this.Hash = hash;
this.Nonce = nonce;
}
public int Index
{
get; private set;
}
public string PreviousHash
{
get; private set;
}
public long Timestamp
{
get; private set;
}
public dynamic Data
{
get; private set;
}
public string Hash
{
get; private set;
}
public int Nonce
{
get; private set;
}
public static Block Genesis
{
get
{
return new Block(
0,
"0",
1508270000000,
"Welcome to Blockchain Demo 2.0!",
"000dc75a315c77a1f9c98fb6247d03dd18ac52632d7dc6a9920261d8109b37cf",
604
);
}
}
}
}