Module: Ethereum::CachedBlock

Defined in:
lib/ethereum/cached_block.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_cached(blk) ⇒ Object



5
6
7
8
# File 'lib/ethereum/cached_block.rb', line 5

def self.create_cached(blk)
  blk.singleton_class.send :include, self
  blk
end

Instance Method Details

#commit_stateObject



18
19
20
# File 'lib/ethereum/cached_block.rb', line 18

def commit_state
  # do nothing
end

#full_hashObject



26
27
28
# File 'lib/ethereum/cached_block.rb', line 26

def full_hash
  @full_hash ||= super
end

#hashObject



22
23
24
# File 'lib/ethereum/cached_block.rb', line 22

def hash
  Utils.big_endian_to_int full_hash
end

#revert(*args) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/ethereum/cached_block.rb', line 14

def revert(*args)
  raise NotImplementedError
end

#state_root=(*args) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/ethereum/cached_block.rb', line 10

def state_root=(*args)
  raise NotImplementedError
end