Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SendTransaction in dipperin external api and fix log tips #63

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/dipperincli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func appAction(c *cli.Context) {
case chain_config.BootEnvVenus, chain_config.BootEnvMercury,
chain_config.BootEnvTest, chain_config.BootEnvLocal:
default:
log.DLogger.Error("boots_env set error,please check!", zap.String("bootEnv", env))
log.DLogger.Warn("boots_env set error,please check!", zap.String("bootEnv", env))
return
}

Expand Down
4 changes: 2 additions & 2 deletions common/g-error/full_ chain_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package g_error
import "github.com/pkg/errors"

var (
ErrNotMineMaster = errors.New("current node is not mine master")
)
ErrNotMineMaster = errors.New("current node is not mine master")
)
3 changes: 2 additions & 1 deletion core/rpc-interface/chainstack_mercury_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ func (api *DipperinVenusApi) GetBlockNumber(hash common.Hash) *uint64 {
return api.service.GetBlockNumber(hash)
}

func (api *DipperinVenusApi) ConvertLogs(logs []*model2.Log) ([]*model2.Log, error) {
func (api *DipperinVenusApi) ConvertLogs(logs []*model2.Log) ([]*model2.Log, error) {
return api.service.ConvertLogs(logs)
}

// get genesis block
// swagger:operation GET /url/GetGenesis block information block
// ---
Expand Down
7 changes: 5 additions & 2 deletions core/rpc-interface/dipperin_external_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ type DipperExternalApi struct {
allApis *DipperinVenusApi
}

func (api *DipperExternalApi) SendTransaction(from, to common.Address, value, gasPrice *big.Int, gasLimit uint64, data []byte, nonce *uint64) (common.Hash, error) {
return api.allApis.SendTransaction(from, to, value, gasPrice, gasLimit, data, nonce)
}

// verify whether the chain is in sync
func (api *DipperExternalApi) GetSyncStatus() bool {
return api.allApis.GetSyncStatus()
Expand Down Expand Up @@ -96,8 +100,7 @@ func (api *DipperExternalApi) GetBlockNumber(hash common.Hash) *uint64 {
return api.allApis.GetBlockNumber(hash)
}


func (api *DipperExternalApi) ConvertLogs(logs []*model2.Log) ([]*model2.Log, error) {
func (api *DipperExternalApi) ConvertLogs(logs []*model2.Log) ([]*model2.Log, error) {
return api.allApis.ConvertLogs(logs)
}

Expand Down