Skip to content

Commit e439b04

Browse files
Remove commented out piece of code
1 parent d7953dc commit e439b04

File tree

3 files changed

+0
-88
lines changed

3 files changed

+0
-88
lines changed

Sources/web3swift/Convenience/RIPEMD160+StackOveflow.swift

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -391,92 +391,6 @@ public struct RIPEMD160 {
391391

392392
return data
393393
}
394-
395-
// public mutating func update(data: Data) throws {
396-
// try data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in
397-
//
398-
// if let bodyAddress = body.baseAddress, body.count > 0 {
399-
// var ptr = bodyAddress.assumingMemoryBound(to: UInt8.self)
400-
// var length = data.count
401-
// var X = [UInt32](repeating: 0, count: 16)
402-
//
403-
// // Process remaining bytes from last call:
404-
// if buffer.count > 0 && buffer.count + length >= 64 {
405-
// let amount = 64 - buffer.count
406-
// buffer.append(ptr, count: amount)
407-
// try buffer.withUnsafeBytes { (body: UnsafeRawBufferPointer) in
408-
// if let bodyAddress = body.baseAddress, body.count > 0 {
409-
// let pointer = bodyAddress.assumingMemoryBound(to: Void.self)
410-
// _ = memcpy(&X, pointer, 64)
411-
// } else {
412-
// throw Web3Error.dataError
413-
// }
414-
// }
415-
// compress(X)
416-
// ptr += amount
417-
// length -= amount
418-
// }
419-
// // Process 64 byte chunks:
420-
// while length >= 64 {
421-
// memcpy(&X, ptr, 64)
422-
// compress(X)
423-
// ptr += 64
424-
// length -= 64
425-
// }
426-
// // Save remaining unprocessed bytes:
427-
// buffer = Data(bytes: ptr, count: length)
428-
// } else {
429-
// throw Web3Error.dataError
430-
// }
431-
//
432-
// }
433-
// count += Int64(data.count)
434-
// }
435-
//
436-
// public mutating func finalize() throws -> Data {
437-
// var X = [UInt32](repeating: 0, count: 16)
438-
// /* append the bit m_n == 1 */
439-
// buffer.append(0x80)
440-
// try buffer.withUnsafeBytes { (body: UnsafeRawBufferPointer) in
441-
// if let bodyAddress = body.baseAddress, body.count > 0 {
442-
// let pointer = bodyAddress.assumingMemoryBound(to: Void.self)
443-
// _ = memcpy(&X, pointer, buffer.count)
444-
// } else {
445-
// throw Web3Error.dataError
446-
// }
447-
// }
448-
//
449-
// if (count & 63) > 55 {
450-
// /* length goes to next block */
451-
// compress(X)
452-
// X = [UInt32](repeating: 0, count: 16)
453-
// }
454-
//
455-
// /* append length in bits */
456-
// let lswlen = UInt32(truncatingIfNeeded: count)
457-
// let mswlen = UInt32(UInt64(count) >> 32)
458-
// X[14] = lswlen << 3
459-
// X[15] = (lswlen >> 29) | (mswlen << 3)
460-
// compress(X)
461-
//
462-
// var data = Data(count: 20)
463-
// try data.withUnsafeMutableBytes { (body: UnsafeMutableRawBufferPointer) in
464-
// if let bodyAddress = body.baseAddress, body.count > 0 {
465-
// let pointer = bodyAddress.assumingMemoryBound(to: UInt32.self)
466-
// pointer[0] = MDbuf.0
467-
// pointer[1] = MDbuf.1
468-
// pointer[2] = MDbuf.2
469-
// pointer[3] = MDbuf.3
470-
// pointer[4] = MDbuf.4
471-
// } else {
472-
// throw Web3Error.dataError
473-
// }
474-
// }
475-
//
476-
// buffer = Data()
477-
//
478-
// return data
479-
// }
480394
}
481395

482396
public extension RIPEMD160 {

Sources/web3swift/EthereumABI/ABIEncoding.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ extension ABIEncoder {
256256
toReturn.append(encoding)
257257
}
258258
let total = lengthEncoding + toReturn
259-
// print("Dynamic array of static types encoding :\n" + String(total.toHexString()))
260259
return total
261260
} else {
262261
// create new context

Sources/web3swift/Promises/Promise+Web3+Eth+FeeHistory.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import BigInt
1111

1212
extension web3.Eth {
1313
func feeHistory(blockCount: BigUInt, block: String, percentiles:[Double]) async throws -> Web3.Oracle.FeeHistory {
14-
1514
let parameters: [JSONRPCParameter] = [blockCount.description.addHexPrefix(), block, percentiles]
1615

1716
let request = JSONRPCRequestFabric.prepareRequest(.feeHistory, parameters: parameters)

0 commit comments

Comments
 (0)