@@ -136,7 +136,7 @@ public byte[] ToArray()
136
136
/// </summary>
137
137
public class TxOut
138
138
{
139
- public long Amount { get ; private set ; } //8 bytes
139
+ public ulong Amount { get ; private set ; } //8 bytes
140
140
public uint scriptLength { get ; private set ; } //4 bytes
141
141
public Script script { get ; set ; } //unknown size <-- locks transaction
142
142
@@ -146,14 +146,14 @@ public class TxOut
146
146
/// Create empty TxOut without script
147
147
/// </summary>
148
148
/// <param name="amount">The amount</param>
149
- public TxOut ( long amount ) : this ( amount , new Script ( ) ) { }
149
+ public TxOut ( ulong amount ) : this ( amount , new Script ( ) ) { }
150
150
151
151
/// <summary>
152
152
/// Create new TxOut object
153
153
/// </summary>
154
154
/// <param name="amount">The amount</param>
155
155
/// <param name="lockingScript">The script that locks the transaction</param>
156
- public TxOut ( long amount , Script lockingScript )
156
+ public TxOut ( ulong amount , Script lockingScript )
157
157
{
158
158
this . Amount = amount ;
159
159
this . script = lockingScript ;
@@ -166,7 +166,7 @@ public TxOut(long amount, Script lockingScript)
166
166
/// <param name="serialized">Serialized object byte[12+]</param>
167
167
public TxOut ( byte [ ] serialized )
168
168
{
169
- this . Amount = BitConverter . ToInt64 ( serialized , 0 ) ;
169
+ this . Amount = BitConverter . ToUInt64 ( serialized , 0 ) ;
170
170
this . scriptLength = BitConverter . ToUInt32 ( serialized , 8 ) ;
171
171
this . script = new Script ( serialized . Skip ( 12 ) . ToArray ( ) ) ;
172
172
}
0 commit comments