mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
TMP Commit
This commit is contained in:
parent
01d4a40325
commit
cd85455098
1 changed files with 5 additions and 9 deletions
|
|
@ -249,17 +249,13 @@ func (c *sum3) RequiredGas(input []byte) uint64 {
|
||||||
func (c *sum3) Run(input []byte) ([]byte, error) {
|
func (c *sum3) Run(input []byte) ([]byte, error) {
|
||||||
log.Info(fmt.Sprintf("input: %v\n", input))
|
log.Info(fmt.Sprintf("input: %v\n", input))
|
||||||
|
|
||||||
//num := big.Int{}
|
//a := make([]byte, 32)
|
||||||
//num.SetBytes(input)
|
//copy(a, input[:32])
|
||||||
//
|
|
||||||
//big.
|
|
||||||
|
|
||||||
//output := []byte{40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40}
|
a := big.Int{}
|
||||||
|
a.SetBytes(input[:32])
|
||||||
|
|
||||||
output := make([]byte, 32)
|
return common.LeftPadBytes(a.Bytes(), 32), nil
|
||||||
copy(output, input)
|
|
||||||
|
|
||||||
return output, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RIPEMD160 implemented as a native contract.
|
// RIPEMD160 implemented as a native contract.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue