File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ pub struct SortitionInfo {
114
114
/// In Stacks 3.x, this is the first block of the parent tenure.
115
115
pub committed_block_hash : Option < BlockHeaderHash > ,
116
116
#[ serde( with = "prefix_opt_hex" ) ]
117
- /// doc
117
+ /// This is the VRF seed generated by this sortition
118
118
pub vrf_seed : Option < VRFSeed > ,
119
119
}
120
120
Original file line number Diff line number Diff line change 16
16
use std:: collections:: BTreeMap ;
17
17
use std:: net:: { IpAddr , Ipv4Addr , SocketAddr } ;
18
18
19
+ use clarity:: types:: chainstate:: VRFSeed ;
19
20
use stacks_common:: types:: chainstate:: { BurnchainHeaderHash , ConsensusHash } ;
20
21
use stacks_common:: types:: net:: PeerHost ;
21
22
@@ -159,6 +160,13 @@ fn response() {
159
160
let second_entry: SortitionInfo = serde_json:: from_value ( info_array[ 1 ] . clone ( ) )
160
161
. expect ( "Response array elements should parse to SortitionInfo" ) ;
161
162
assert ! ( first_entry. was_sortition) ;
163
+ assert_eq ! (
164
+ first_entry. vrf_seed,
165
+ Some (
166
+ VRFSeed :: from_hex( "48b754acc291a5bfad1354ee19bbc471f14af2b21dc7eccc0f929bd16798defe" )
167
+ . unwrap( )
168
+ )
169
+ ) ;
162
170
assert ! ( second_entry. was_sortition) ;
163
171
assert_eq ! (
164
172
first_entry. last_sortition_ch. as_ref( ) . unwrap( ) ,
You can’t perform that action at this time.
0 commit comments