Class: Sigma::PreHeader
- Inherits:
-
Object
- Object
- Sigma::PreHeader
- Extended by:
- FFI::Library
- Defined in:
- lib/sigma/pre_header.rb
Overview
Block header with the current ‘spendingTransaction`, that can be predicted by a miner before its formation
Instance Attribute Summary collapse
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Class Method Summary collapse
-
.with_block_header(block_header) ⇒ PreHeader
Create using data from block_header.
Instance Method Summary collapse
-
#==(ph_two) ⇒ bool
Equality check.
Instance Attribute Details
#pointer ⇒ Object
Returns the value of attribute pointer.
14 15 16 |
# File 'lib/sigma/pre_header.rb', line 14 def pointer @pointer end |
Class Method Details
.with_block_header(block_header) ⇒ PreHeader
Create using data from block_header
19 20 21 22 23 |
# File 'lib/sigma/pre_header.rb', line 19 def self.with_block_header(block_header) pointer = FFI::MemoryPointer.new(:pointer) ergo_lib_preheader_from_block_header(block_header.pointer, pointer) init(pointer) end |
Instance Method Details
#==(ph_two) ⇒ bool
Equality check
28 29 30 |
# File 'lib/sigma/pre_header.rb', line 28 def ==(ph_two) ergo_lib_pre_header_eq(self.pointer, ph_two.pointer) end |