github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/random_beacon_signer.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 crypto "github.com/onflow/flow-go/crypto" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // RandomBeaconSigner is an autogenerated mock type for the RandomBeaconSigner type 12 type RandomBeaconSigner struct { 13 mock.Mock 14 } 15 16 // EnoughShares provides a mock function with given fields: 17 func (_m *RandomBeaconSigner) EnoughShares() bool { 18 ret := _m.Called() 19 20 var r0 bool 21 if rf, ok := ret.Get(0).(func() bool); ok { 22 r0 = rf() 23 } else { 24 r0 = ret.Get(0).(bool) 25 } 26 27 return r0 28 } 29 30 // Reconstruct provides a mock function with given fields: 31 func (_m *RandomBeaconSigner) Reconstruct() (crypto.Signature, error) { 32 ret := _m.Called() 33 34 var r0 crypto.Signature 35 if rf, ok := ret.Get(0).(func() crypto.Signature); ok { 36 r0 = rf() 37 } else { 38 if ret.Get(0) != nil { 39 r0 = ret.Get(0).(crypto.Signature) 40 } 41 } 42 43 var r1 error 44 if rf, ok := ret.Get(1).(func() error); ok { 45 r1 = rf() 46 } else { 47 r1 = ret.Error(1) 48 } 49 50 return r0, r1 51 } 52 53 // SignShare provides a mock function with given fields: 54 func (_m *RandomBeaconSigner) SignShare() (crypto.Signature, error) { 55 ret := _m.Called() 56 57 var r0 crypto.Signature 58 if rf, ok := ret.Get(0).(func() crypto.Signature); ok { 59 r0 = rf() 60 } else { 61 if ret.Get(0) != nil { 62 r0 = ret.Get(0).(crypto.Signature) 63 } 64 } 65 66 var r1 error 67 if rf, ok := ret.Get(1).(func() error); ok { 68 r1 = rf() 69 } else { 70 r1 = ret.Error(1) 71 } 72 73 return r0, r1 74 } 75 76 // TrustedAdd provides a mock function with given fields: signerIndex, share 77 func (_m *RandomBeaconSigner) TrustedAdd(signerIndex int, share crypto.Signature) (bool, error) { 78 ret := _m.Called(signerIndex, share) 79 80 var r0 bool 81 if rf, ok := ret.Get(0).(func(int, crypto.Signature) bool); ok { 82 r0 = rf(signerIndex, share) 83 } else { 84 r0 = ret.Get(0).(bool) 85 } 86 87 var r1 error 88 if rf, ok := ret.Get(1).(func(int, crypto.Signature) error); ok { 89 r1 = rf(signerIndex, share) 90 } else { 91 r1 = ret.Error(1) 92 } 93 94 return r0, r1 95 } 96 97 // Verify provides a mock function with given fields: signerIndex, share 98 func (_m *RandomBeaconSigner) Verify(signerIndex int, share crypto.Signature) error { 99 ret := _m.Called(signerIndex, share) 100 101 var r0 error 102 if rf, ok := ret.Get(0).(func(int, crypto.Signature) error); ok { 103 r0 = rf(signerIndex, share) 104 } else { 105 r0 = ret.Error(0) 106 } 107 108 return r0 109 }