Update to follow DB spec

This commit is contained in:
a_bennassar
2020-07-31 15:55:09 +02:00
parent 819b29d9ba
commit 638defd031
16 changed files with 172 additions and 107 deletions

View File

@@ -56,8 +56,8 @@ func (l2db *L2DB) AddTx(tx *common.PoolL2Tx) error {
return nil
}
// AddRegisterAuthorization inserts a register authorization into the DB
func (l2db *L2DB) AddRegisterAuthorization() error { // TODO: AddRegisterAuthorization(auth &common.RegisterAuthorization)
// AddAccountCreationAuth inserts an account creation authorization into the DB
func (l2db *L2DB) AddAccountCreationAuth(auth *common.AccountCreationAuth) error { // TODO: AddRegisterAuthorization(auth &common.RegisterAuthorization)
return nil
}
@@ -71,9 +71,9 @@ func (l2db *L2DB) GetPendingTxs() ([]common.PoolL2Tx, error) {
return nil, nil
}
// GetRegisterAuthorization return the authorization to make registers of an Etherum address
func (l2db *L2DB) GetRegisterAuthorization(ethAddr eth.Address) (int, error) { // TODO: int will be changed to *common.RegisterAuthorization
return 0, nil
// GetAccountCreationAuth return the authorization to make registers of an Ethereum address
func (l2db *L2DB) GetAccountCreationAuth(ethAddr eth.Address) (*common.AccountCreationAuth, error) {
return nil, nil
}
// StartForging updates the state of the transactions that will begin the forging process.