File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,9 @@ public async Task GetBlockTest()
161
161
var response2 = await _client . GetBlock ( 1 ) ;
162
162
var result2 = response2 . Parse ( ) ;
163
163
Assert . IsNotNull ( result2 . Block . Hash ) ;
164
-
164
+
165
+ Assert . AreEqual ( result2 . Block . Body . Proposer . IsSystem , result2 . Block . Body . Proposer . isSystem ) ;
166
+
165
167
var response3 = await _client . GetBlock ( result2 . Block . Hash ) ;
166
168
var result3 = response3 . Parse ( ) ;
167
169
Assert . AreEqual ( result2 . Block . Hash , result3 . Block . Hash ) ;
@@ -214,7 +216,8 @@ public async Task GetSystemBlockProposerTest()
214
216
var response = await _client . GetBlock ( 0 ) ;
215
217
var result = response . Parse ( ) ;
216
218
Assert . IsNotNull ( result . Block . Hash ) ;
217
- Assert . IsTrue ( result . Block . Body . Proposer . isSystem ) ;
219
+ Assert . IsTrue ( result . Block . Body . Proposer . IsSystem ) ;
220
+ Assert . AreEqual ( result . Block . Body . Proposer . IsSystem , result . Block . Body . Proposer . isSystem ) ;
218
221
}
219
222
catch ( RpcClientException e )
220
223
{
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . ComponentModel ;
3
4
using System . Text . Json ;
4
5
using System . Text . Json . Serialization ;
5
6
@@ -79,7 +80,15 @@ public class Proposer
79
80
/// <summary>
80
81
/// The block was proposed by the system, not a validator
81
82
/// </summary>
82
- public bool isSystem { get ; set ; }
83
+ public bool IsSystem { get ; set ; }
84
+
85
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
86
+ [ Obsolete ( "Replaced with IsSystem" ) ]
87
+ public bool isSystem
88
+ {
89
+ get => this . IsSystem ;
90
+ set => this . IsSystem = value ;
91
+ }
83
92
84
93
/// <summary>
85
94
/// Validator's public key
@@ -102,11 +111,11 @@ public override Proposer Read(
102
111
if ( pkhex == "00" )
103
112
return new Proposer ( )
104
113
{
105
- isSystem = true ,
114
+ IsSystem = true ,
106
115
} ;
107
116
return new Proposer ( )
108
117
{
109
- isSystem = false ,
118
+ IsSystem = false ,
110
119
PublicKey = PublicKey . FromHexString ( pkhex ) ,
111
120
} ;
112
121
}
@@ -121,7 +130,7 @@ public override void Write(
121
130
Proposer proposer ,
122
131
JsonSerializerOptions options )
123
132
{
124
- writer . WriteStringValue ( proposer . isSystem ? "00" : proposer . PublicKey . ToAccountHex ( ) ) ;
133
+ writer . WriteStringValue ( proposer . IsSystem ? "00" : proposer . PublicKey . ToAccountHex ( ) ) ;
125
134
}
126
135
}
127
136
}
You can’t perform that action at this time.
0 commit comments