mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 09:41:38 +00:00
Config is passed into each module. Remove tendermint/confer
This commit is contained in:
11
types/tx.go
11
types/tx.go
@ -7,7 +7,6 @@ import (
|
||||
"github.com/tendermint/tendermint/account"
|
||||
"github.com/tendermint/tendermint/binary"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
"github.com/tendermint/tendermint/config"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -132,7 +131,7 @@ type SendTx struct {
|
||||
|
||||
func (tx *SendTx) WriteSignBytes(w io.Writer, n *int64, err *error) {
|
||||
// We hex encode the network name so we don't deal with escaping issues.
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.App().GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`,"tx":[%v,{"inputs":[`, TxTypeSend)), w, n, err)
|
||||
for i, in := range tx.Inputs {
|
||||
in.WriteSignBytes(w, n, err)
|
||||
@ -166,7 +165,7 @@ type CallTx struct {
|
||||
|
||||
func (tx *CallTx) WriteSignBytes(w io.Writer, n *int64, err *error) {
|
||||
// We hex encode the network name so we don't deal with escaping issues.
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.App().GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`,"tx":[%v,{"address":"%X","data":"%X"`, TxTypeCall, tx.Address, tx.Data)), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`,"fee":%v,"gas_limit":%v,"input":`, tx.Fee, tx.GasLimit)), w, n, err)
|
||||
tx.Input.WriteSignBytes(w, n, err)
|
||||
@ -187,7 +186,7 @@ type BondTx struct {
|
||||
|
||||
func (tx *BondTx) WriteSignBytes(w io.Writer, n *int64, err *error) {
|
||||
// We hex encode the network name so we don't deal with escaping issues.
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.App().GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`,"tx":[%v,{"inputs":[`, TxTypeBond)), w, n, err)
|
||||
for i, in := range tx.Inputs {
|
||||
in.WriteSignBytes(w, n, err)
|
||||
@ -221,7 +220,7 @@ type UnbondTx struct {
|
||||
|
||||
func (tx *UnbondTx) WriteSignBytes(w io.Writer, n *int64, err *error) {
|
||||
// We hex encode the network name so we don't deal with escaping issues.
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.App().GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`,"tx":[%v,{"address":"%X","height":%v}]}`, TxTypeUnbond, tx.Address, tx.Height)), w, n, err)
|
||||
}
|
||||
|
||||
@ -239,7 +238,7 @@ type RebondTx struct {
|
||||
|
||||
func (tx *RebondTx) WriteSignBytes(w io.Writer, n *int64, err *error) {
|
||||
// We hex encode the network name so we don't deal with escaping issues.
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.App().GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.GetString("network"))), w, n, err)
|
||||
binary.WriteTo([]byte(Fmt(`,"tx":[%v,{"address":"%X","height":%v}]}`, TxTypeRebond, tx.Address, tx.Height)), w, n, err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user