mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 17:03:46 +00:00
Implemented the GetVoteOnHash under Bor namespace
This commit is contained in:
parent
07d7c6c6e2
commit
43d54c4456
2 changed files with 17 additions and 0 deletions
|
|
@ -139,6 +139,9 @@ func GetAPIs(apiBackend Backend) []rpc.API {
|
||||||
}, {
|
}, {
|
||||||
Namespace: "personal",
|
Namespace: "personal",
|
||||||
Service: NewPersonalAccountAPI(apiBackend, nonceLock),
|
Service: NewPersonalAccountAPI(apiBackend, nonceLock),
|
||||||
|
}, {
|
||||||
|
Namespace: "bor",
|
||||||
|
Service: NewBorAPI(apiBackend),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,3 +51,17 @@ func (s *BlockChainAPI) appendRPCMarshalBorTransaction(ctx context.Context, bloc
|
||||||
|
|
||||||
return fields
|
return fields
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EthereumAPI provides an API to access Ethereum related information.
|
||||||
|
type BorAPI struct {
|
||||||
|
b Backend
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewEthereumAPI creates a new Ethereum protocol API.
|
||||||
|
func NewBorAPI(b Backend) *BorAPI {
|
||||||
|
return &BorAPI{b}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (api *BorAPI) GetVoteOnHash(ctx context.Context, starBlockNr uint64, endBlockNr uint64, hash string, milestoneId string) (bool, error) {
|
||||||
|
return api.b.GetVoteOnHash(ctx, starBlockNr, endBlockNr, hash, milestoneId)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue